You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by bhorvat <ho...@gmail.com> on 2012/10/30 23:07:38 UTC

Displaying UploadedFile in the browser

Hi all, 

I would like to use the ajax to upload several images and once the user
clicks the button he can then submit them, my question is how can I achieve
this? Is it possible to return UploadedFile somehow so that I can get an
image to display in the img tag?



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Displaying-UploadedFile-in-the-browser-tp5717442.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Displaying UploadedFile in the browser

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 30 Oct 2012 21:25:03 -0200, bhorvat <ho...@gmail.com>  
wrote:

> Hi

Hi!

> Yea I have seen that demo as well, and my problem is that I need to show  
> the image that the user has uploaded. So my question is how can I get  
> from
> UploadFile something that can be visible without storing it to the hard  
> disk and then displaying it.
>
> My idea is to keep the UploadFiles in memory and if the users leaves  
> without clicking submit the updates are deleted. If I story them then it  
> will be
> much harder for me to find out which ones should be cleared because the  
> user didnt not click save button

You need to use a StreamResponse. Search the web and this mailing list  
archives to find examples.

-- 
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Displaying UploadedFile in the browser

Posted by bhorvat <ho...@gmail.com>.
Hi 

Yea I have seen that demo as well, and my problem is that I need to show the
image that the user has uploaded. So my question is how can I get from
UploadFile something that can be visible without storing it to the hard disk
and then displaying it. 

My idea is to keep the UploadFiles in memory and if the users leaves without
clicking submit the updates are deleted. If I story them then it will be
much harder for me to find out which ones should be cleared because the user
didnt not click save button 



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Displaying-UploadedFile-in-the-browser-tp5717442p5717446.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Displaying UploadedFile in the browser

Posted by Kristian Marinkovic <kr...@gmail.com>.
Hi,

i just implemented an ajax upload using the AjaxUpload component from
the tapestry5-jquery project. And i had to dive deeper into the
documentation and code of the JS file-uploader component used by the
AjaxUpload.

There are examples in the documentation that almost solve your needs:
http://fineuploader.com/fine-uploader-demo.html

g,
kris



On Tue, Oct 30, 2012 at 11:07 PM, bhorvat <ho...@gmail.com> wrote:
> Hi all,
>
> I would like to use the ajax to upload several images and once the user
> clicks the button he can then submit them, my question is how can I achieve
> this? Is it possible to return UploadedFile somehow so that I can get an
> image to display in the img tag?
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Displaying-UploadedFile-in-the-browser-tp5717442.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org