English 中文(简体)
How do I upload an image as a File and display it as a Thumbnail with Tapestry 5?
原标题:

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

Using the chenillekit 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

问题回答

暂无回答




相关问题
How can I load a folders files into a ListView?

I d like to have a user select a folder with the FolderBrowserDialog and have the files loaded into the ListView. My intention is to make a little playlist of sorts so I have to modify a couple of ...

File Handling Issue

I am developing a tool in c#, at one instance I start writing into a xml file continuously using my tool,when i suddenly restart my machine the particular xml file gets corrupted, what is the reason ...

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Saving output of a for-loop to file

I have opened a file with blast results and printed out the hits in fasta format to the screen. The code looks like this: result_handle = open("/Users/jonbra/Desktop/my_blast.xml") from Bio.Blast ...

热门标签