You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by grabarz <um...@gazeta.pl> on 2009/06/07 15:01:16 UTC

File upload and AJAXized forms

hi,
is it possible to use tapestry-upload with form submitted by XHR? i was
trying to use uploading in such a form, but no success. deeper digging
pointed me to MultipartServletRequestFilter. in the following code:

public boolean service(HttpServletRequest request, HttpServletResponse response, HttpServletRequestHandler handler) throws IOException
{
  HttpServletRequest newRequest = ServletFileUpload.isMultipartContent(request) ? decoder.decode(request) : request;
  return handler.service(newRequest, response);
}

the condition ServletFileUpload.isMultipartContent(request) is false
each time. is there anything i should do more to make my request a
multiparted one?

thanks,
m.


-- 
Mess with the best, die like a rest!


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


Re: File upload and AJAXized forms

Posted by "Joost Schouten (mailing lists)" <jo...@jsportal.com>.
I believe you are correct in that uploading in XHR is not possible.
The way we have done this in the past is by uploading to an iframe or
by placing the upload form in an iframe on the page. A Tapestry
component that does this would be very useful indeed.

cheers,
Joost

On Mon, Jun 8, 2009 at 2:23 PM, DH<ni...@gmail.com> wrote:
> I remembered it seems that file uploading is not supported by XHR.
>
> DH
>
> ----- Original Message -----
> From: "Hugo Palma"
> Sent: Monday, June 08, 2009 2:46 AM
> Subject: Re: File upload and AJAXized forms
>
>
>> I've created an issue for this  (
>> https://issues.apache.org/jira/browse/TAP5-638)
>> You can vote for it if you want it fixed.
>>
>> 2009/6/7 grabarz <um...@gazeta.pl>
>>
>>> hi,
>>> is it possible to use tapestry-upload with form submitted by XHR? i was
>>> trying to use uploading in such a form, but no success. deeper digging
>>> pointed me to MultipartServletRequestFilter. in the following code:
>>>
>>> public boolean service(HttpServletRequest request, HttpServletResponse
>>> response, HttpServletRequestHandler handler) throws IOException
>>> {
>>>  HttpServletRequest newRequest =
>>> ServletFileUpload.isMultipartContent(request) ? decoder.decode(request) :
>>> request;
>>>  return handler.service(newRequest, response);
>>> }
>>>
>>> the condition ServletFileUpload.isMultipartContent(request) is false
>>> each time. is there anything i should do more to make my request a
>>> multiparted one?
>>>
>>> thanks,
>>> m.
>>>
>>>
>>> --
>>> Mess with the best, die like a rest!
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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


Re: File upload and AJAXized forms

Posted by DH <ni...@gmail.com>.
I remembered it seems that file uploading is not supported by XHR.

DH

----- Original Message ----- 
From: "Hugo Palma" 
Sent: Monday, June 08, 2009 2:46 AM
Subject: Re: File upload and AJAXized forms


> I've created an issue for this  (
> https://issues.apache.org/jira/browse/TAP5-638)
> You can vote for it if you want it fixed.
> 
> 2009/6/7 grabarz <um...@gazeta.pl>
> 
>> hi,
>> is it possible to use tapestry-upload with form submitted by XHR? i was
>> trying to use uploading in such a form, but no success. deeper digging
>> pointed me to MultipartServletRequestFilter. in the following code:
>>
>> public boolean service(HttpServletRequest request, HttpServletResponse
>> response, HttpServletRequestHandler handler) throws IOException
>> {
>>  HttpServletRequest newRequest =
>> ServletFileUpload.isMultipartContent(request) ? decoder.decode(request) :
>> request;
>>  return handler.service(newRequest, response);
>> }
>>
>> the condition ServletFileUpload.isMultipartContent(request) is false
>> each time. is there anything i should do more to make my request a
>> multiparted one?
>>
>> thanks,
>> m.
>>
>>
>> --
>> Mess with the best, die like a rest!
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>

Re: File upload and AJAXized forms

Posted by Hugo Palma <hu...@gmail.com>.
I've created an issue for this  (
https://issues.apache.org/jira/browse/TAP5-638)
You can vote for it if you want it fixed.

2009/6/7 grabarz <um...@gazeta.pl>

> hi,
> is it possible to use tapestry-upload with form submitted by XHR? i was
> trying to use uploading in such a form, but no success. deeper digging
> pointed me to MultipartServletRequestFilter. in the following code:
>
> public boolean service(HttpServletRequest request, HttpServletResponse
> response, HttpServletRequestHandler handler) throws IOException
> {
>  HttpServletRequest newRequest =
> ServletFileUpload.isMultipartContent(request) ? decoder.decode(request) :
> request;
>  return handler.service(newRequest, response);
> }
>
> the condition ServletFileUpload.isMultipartContent(request) is false
> each time. is there anything i should do more to make my request a
> multiparted one?
>
> thanks,
> m.
>
>
> --
> Mess with the best, die like a rest!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>