开发者

How do I upload an image as a File and display it as a Thumbnail with Tapestry 5?

开发者 https://www.devze.com 2022-12-11 04:09 出处:网络
Using the 3rd party tapestry-upload component, I can upload a File from the client on the server. Using the chenillekit开发者_如何学Python\'s thumbnail component, a can make a thumbnail from an Asset

Using the 3rd party tapestry-upload component, I can upload a File from the client on the server.

Using the chenillekit开发者_如何学Python's thumbnail component, a can make a thumbnail from an Asset.

How can I convert my File into an Asset in order for the Thumbnail component to provide me the image thumbnail ?


There are a few threads on the mailing list that deal with this. Basically, you need to contribute a custom AssetFactory that reads the image from disk (or the database). You might also look at URIAssetFactory which is part of ChenilleKit itself.

Here are a few links to help:

https://issues.apache.org/jira/browse/TAP5-423

http://www.mail-archive.com/users@tapestry.apache.org/msg33692.html

0

精彩评论

暂无评论...
验证码 换一张
取 消