You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Okie Othsam <ok...@outlook.de> on 2014/09/25 09:33:45 UTC

How can I access uploaded file in page without form

Hello,
I already try to get my question answered at Stack Overflow but maybe it's to exotic for there 
... so I try it at the source :-D

I'm using Apache Tapestry v5.3.7 and I already use the normal 
Tapestry upload component in a form. For a better user experience I try 
now to integrate Dropzone.js in a normal Tapestry page without any form.
 The JavaScript integration works fine. The uploaded file data are 
transferred to my server with a post request and I can access the 
request with all of its parameters.




My question is now how can I access the binary data of the uploaded 
file (maybe as InputStream) to save them in my system? I already 
injected the http request but getInputStream returns a empty stream.




Thanks for any suggestions


 		 	   		  

RE: How can I access uploaded file in page without form

Posted by Okie Othsam <ok...@outlook.de>.
Thank you to all :-)
and Chris I think you are right :-/
that's the direction I will look for.

Cheers,
Eiko

> Date: Thu, 25 Sep 2014 23:21:48 +0200
> Subject: Re: How can I access uploaded file in page without form
> From: mailinglist@nesluop.dk
> To: users@tapestry.apache.org
> 
> I haven't used dropzone.js but from a quick glance at the docs it looks
> like it performs a normal post. Normally uploaded files in tapestry are
> extracted from the request using a multipart decoder, you should probably
> take a look at the source code for tapestry-upload to see what is going on.
> 
> -- 
> Chris
> 
> On Thu, Sep 25, 2014 at 3:49 PM, Thiago H de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
> 
> > On Thu, 25 Sep 2014 04:33:45 -0300, Okie Othsam <ok...@outlook.de>
> > wrote:
> >
> >  Hello,
> >>
> >
> > Hi!
> >
> >  My question is now how can I access the binary data of the uploaded
> >> file (maybe as InputStream) to save them in my system? I already
> >> injected the http request but getInputStream returns a empty stream.
> >>
> >
> > To what URL are you POST'ing the image? You'll only be able to retrieve it
> > in the same request the upload was done.
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Tapestry, Java and Hibernate consultant and developer
> > http://machina.com.br
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
 		 	   		  

Re: How can I access uploaded file in page without form

Posted by Chris Poulsen <ma...@nesluop.dk>.
I haven't used dropzone.js but from a quick glance at the docs it looks
like it performs a normal post. Normally uploaded files in tapestry are
extracted from the request using a multipart decoder, you should probably
take a look at the source code for tapestry-upload to see what is going on.

-- 
Chris

On Thu, Sep 25, 2014 at 3:49 PM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Thu, 25 Sep 2014 04:33:45 -0300, Okie Othsam <ok...@outlook.de>
> wrote:
>
>  Hello,
>>
>
> Hi!
>
>  My question is now how can I access the binary data of the uploaded
>> file (maybe as InputStream) to save them in my system? I already
>> injected the http request but getInputStream returns a empty stream.
>>
>
> To what URL are you POST'ing the image? You'll only be able to retrieve it
> in the same request the upload was done.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: How can I access uploaded file in page without form

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 25 Sep 2014 04:33:45 -0300, Okie Othsam <ok...@outlook.de>  
wrote:

> Hello,

Hi!

> My question is now how can I access the binary data of the uploaded
> file (maybe as InputStream) to save them in my system? I already
> injected the http request but getInputStream returns a empty stream.

To what URL are you POST'ing the image? You'll only be able to retrieve it  
in the same request the upload was done.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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