You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Amr Mohamed Mahmoud Hassanien <am...@Ey.ae> on 2012/09/09 10:46:45 UTC

Ajax Upload for Tapestry

Dear Taha, Tapestry users,

I checked out the Ajax upload for tapestry, that Taha thankfully made it from the file upload component.

http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/

I have some problems with the component if anyone can help:


1.      I have changed the code to fit in my Tapestry 5.1 project, All works fine but the method onRemoveUpload() of AjaxUpload.java

void onRemoveUpload(@RequestParameter("serverIndex") int serverIndex)
   {
                              ...
               }

The RequestParameter annotation does not exist in tapestry 5.1 . I thought in Tapestry 5.1 it works by just removing the annotation but it didn't work.


2.  I use this component to upload video files, mainly, so as part of my validation I have to check the MIMETYPE, The content type of the file is always application/octet-stream , Is there any work around this?

3.      I 've learned that the component switches automatically to iframe for non-ajax upload supporting browsers like IE, I am using IE8 and the component is not showing up at all. Do you have any idea why?

Please if anyone could help in any of these points , kidly reply to my email

Thanks and Regards,

Amr Hassanin

RE: Ajax Upload for Tapestry

Posted by Amr Mohamed Mahmoud Hassanien <am...@Ey.ae>.
Hello Guys,

Is there any answer about this?

The problem is AjaxUpload.getValue() is not called on form submission. My knowledge in tapestry components is limited, I don't know how to a component is wired with UI and the page class.

You are answer is much appreciated.

Regards

-----Original Message-----
From: Amr Mohamed Mahmoud Hassanien [mailto:amr.hassanien@Ey.ae] 
Sent: 17 سبتمبر, 2012 03:48 م
To: Tapestry users
Subject: RE: Ajax Upload for Tapestry


Thanks Ray...

Actually as the component is not working on IE8, I tried to merge the code also but it did not work,I decided to replace the client component with Yahoo uploader... 
I just have a problem trying to figure out how the control on presentation(*.tml) sends the values  to the a property in the java class

	@Persist
	@Property
	private List<UploadedFile> uploads;

I have included this also in the AjaxUpload.java

 void beginRender(MarkupWriter writer) {
	...//  yahoo uploader
writer.element("input", "type", "text", "id", getClientId(), "style", STYLE_TO_HIDE_INPUT_TEXT, "name", getControlName()); writer.end(); ...// }

The yahoo uploader works in the same manner it uploads the files first in the tmp folder then you can submit the form, Now all what I want to know is how to fill the property , List<UploadedFile> uploads , with uploaded files when the form get submitted.

Please help..

-----Original Message-----
From: Ray Nicholus [mailto:rnicholus@widen.com]
Sent: 16 سبتمبر, 2012 07:36 ص
To: Tapestry users
Subject: Re: Ajax Upload for Tapestry

Note that a more specific content-type for XHR uploads will likely be included in Fine Uploader 2.2 or 2.1, using the type attribute of a file object (see the File API specs for more info).

https://github.com/valums/file-uploader/pull/206

On Tue, Sep 11, 2012 at 6:46 AM, Amr Mohamed Mahmoud Hassanien < amr.hassanien@ey.ae> wrote:

> Hi Ray,
>
> Thanks for your reply.
>
>
> 1.For the first point, I get this error on click remove for any attachment.
> "Communication with the server failed: Request event 'removeupload' 
> (on component video/Submit:uploads) was not handled; you must provide 
> a matching event handler method in the component or in one of its containers"
>         Do you have any idea how to handle this in Tapesrty 5.1 , as I 
> had to change the component's code to T 5.1  ?
>
> 2.Yes that's ok ... I tested Apache Tika to get the Mime type and it 
> works fine , I will use it to validate the file content type.
>
> 3.i'm using the latest code for ajax upload on 
> https://github.com/tawus/tawus/tree/master/tawus-ajaxupload , and IE 
> 8...no java script error ...and when investigating the page source I 
> found
> this:
>
> <fieldset class="field file">
>         <input name="uploads"
> style="display:inline;color:transparent;background:transparent;border:0;height:1px;width:1px;"
> id="uploads" type="text"></input>
>         <span style="display:inline-block" id="uploads_wrapper"></span>
>         <img id="uploads-icon" class="t-error-icon t-invisible" alt=""
> src="/readers-page/assets/tapestry/5.1.0.5/spacer.gif"/>
> </fieldset>
>
>
> I really appreciate your help ..
>
>
> -----Original Message-----
> From: Ray Nicholus [mailto:rnicholus@widen.com]
> Sent: 09 سبتمبر, 2012 07:48 م
> To: Tapestry users
> Subject: Re: Ajax Upload for Tapestry
>
> 2. The only other option is for the upload library to set a more 
> specific the content type based on the file extension.  Even in this 
> case you would need to formally identify the file server-side, since 
> there is no guarantee that this type is correct.
>
> 3.  You'll have to provide more details, such as code, file-uploader 
> "version",etc
>
> On Sep 9, 2012 3:47 AM, "Amr Mohamed Mahmoud Hassanien" < 
> amr.hassanien@ey.ae>
> wrote:
>
> > Dear Taha, Tapestry users,
> >
> > I checked out the Ajax upload for tapestry, that Taha thankfully 
> > made it from the file upload component.
> >
> > http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
> >
> > I have some problems with the component if anyone can help:
> >
> >
> > 1.      I have changed the code to fit in my Tapestry 5.1 project, All
> > works fine but the method onRemoveUpload() of AjaxUpload.java
> >
> > void onRemoveUpload(@RequestParameter("serverIndex") int serverIndex)
> >    {
> >                               ...
> >                }
> >
> > The RequestParameter annotation does not exist in tapestry 5.1 . I 
> > thought in Tapestry 5.1 it works by just removing the annotation but 
> > it
> didn't work.
> >
> >
> > 2.  I use this component to upload video files, mainly, so as part 
> > of my validation I have to check the MIMETYPE, The content type of 
> > the file is always application/octet-stream , Is there any work around this?
> >
> > 3.      I 've learned that the component switches automatically to iframe
> > for non-ajax upload supporting browsers like IE, I am using IE8 and 
> > the component is not showing up at all. Do you have any idea why?
> >
> > Please if anyone could help in any of these points , kidly reply to 
> > my email
> >
> > Thanks and Regards,
> >
> > Amr Hassanin
> >
>
> ---------------------------------------------------------------------
> 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

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

RE: Ajax Upload for Tapestry

Posted by Amr Mohamed Mahmoud Hassanien <am...@Ey.ae>.
Thanks Ray...

Actually as the component is not working on IE8, I tried to merge the code also but it did not work,I decided to replace the client component with Yahoo uploader... 
I just have a problem trying to figure out how the control on presentation(*.tml) sends the values  to the a property in the java class

	@Persist
	@Property
	private List<UploadedFile> uploads;

I have included this also in the AjaxUpload.java

 void beginRender(MarkupWriter writer) {
	...//  yahoo uploader 
writer.element("input", "type", "text", "id", getClientId(), "style", STYLE_TO_HIDE_INPUT_TEXT, "name", getControlName());
writer.end();
...//
}

The yahoo uploader works in the same manner it uploads the files first in the tmp folder then you can submit the form, Now all what I want to know is how to fill the property , List<UploadedFile> uploads , with uploaded files when the form get submitted.

Please help..

-----Original Message-----
From: Ray Nicholus [mailto:rnicholus@widen.com] 
Sent: 16 سبتمبر, 2012 07:36 ص
To: Tapestry users
Subject: Re: Ajax Upload for Tapestry

Note that a more specific content-type for XHR uploads will likely be included in Fine Uploader 2.2 or 2.1, using the type attribute of a file object (see the File API specs for more info).

https://github.com/valums/file-uploader/pull/206

On Tue, Sep 11, 2012 at 6:46 AM, Amr Mohamed Mahmoud Hassanien < amr.hassanien@ey.ae> wrote:

> Hi Ray,
>
> Thanks for your reply.
>
>
> 1.For the first point, I get this error on click remove for any attachment.
> "Communication with the server failed: Request event 'removeupload' 
> (on component video/Submit:uploads) was not handled; you must provide 
> a matching event handler method in the component or in one of its containers"
>         Do you have any idea how to handle this in Tapesrty 5.1 , as I 
> had to change the component's code to T 5.1  ?
>
> 2.Yes that's ok ... I tested Apache Tika to get the Mime type and it 
> works fine , I will use it to validate the file content type.
>
> 3.i'm using the latest code for ajax upload on 
> https://github.com/tawus/tawus/tree/master/tawus-ajaxupload , and IE 
> 8...no java script error ...and when investigating the page source I 
> found
> this:
>
> <fieldset class="field file">
>         <input name="uploads"
> style="display:inline;color:transparent;background:transparent;border:0;height:1px;width:1px;"
> id="uploads" type="text"></input>
>         <span style="display:inline-block" id="uploads_wrapper"></span>
>         <img id="uploads-icon" class="t-error-icon t-invisible" alt=""
> src="/readers-page/assets/tapestry/5.1.0.5/spacer.gif"/>
> </fieldset>
>
>
> I really appreciate your help ..
>
>
> -----Original Message-----
> From: Ray Nicholus [mailto:rnicholus@widen.com]
> Sent: 09 سبتمبر, 2012 07:48 م
> To: Tapestry users
> Subject: Re: Ajax Upload for Tapestry
>
> 2. The only other option is for the upload library to set a more 
> specific the content type based on the file extension.  Even in this 
> case you would need to formally identify the file server-side, since 
> there is no guarantee that this type is correct.
>
> 3.  You'll have to provide more details, such as code, file-uploader 
> "version",etc
>
> On Sep 9, 2012 3:47 AM, "Amr Mohamed Mahmoud Hassanien" < 
> amr.hassanien@ey.ae>
> wrote:
>
> > Dear Taha, Tapestry users,
> >
> > I checked out the Ajax upload for tapestry, that Taha thankfully 
> > made it from the file upload component.
> >
> > http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
> >
> > I have some problems with the component if anyone can help:
> >
> >
> > 1.      I have changed the code to fit in my Tapestry 5.1 project, All
> > works fine but the method onRemoveUpload() of AjaxUpload.java
> >
> > void onRemoveUpload(@RequestParameter("serverIndex") int serverIndex)
> >    {
> >                               ...
> >                }
> >
> > The RequestParameter annotation does not exist in tapestry 5.1 . I 
> > thought in Tapestry 5.1 it works by just removing the annotation but 
> > it
> didn't work.
> >
> >
> > 2.  I use this component to upload video files, mainly, so as part 
> > of my validation I have to check the MIMETYPE, The content type of 
> > the file is always application/octet-stream , Is there any work around this?
> >
> > 3.      I 've learned that the component switches automatically to iframe
> > for non-ajax upload supporting browsers like IE, I am using IE8 and 
> > the component is not showing up at all. Do you have any idea why?
> >
> > Please if anyone could help in any of these points , kidly reply to 
> > my email
> >
> > Thanks and Regards,
> >
> > Amr Hassanin
> >
>
> ---------------------------------------------------------------------
> 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: Ajax Upload for Tapestry

Posted by Ray Nicholus <rn...@widen.com>.
Note that a more specific content-type for XHR uploads will likely be
included in Fine Uploader 2.2 or 2.1, using the type attribute of a file
object (see the File API specs for more info).

https://github.com/valums/file-uploader/pull/206

On Tue, Sep 11, 2012 at 6:46 AM, Amr Mohamed Mahmoud Hassanien <
amr.hassanien@ey.ae> wrote:

> Hi Ray,
>
> Thanks for your reply.
>
>
> 1.For the first point, I get this error on click remove for any attachment.
> "Communication with the server failed: Request event 'removeupload' (on
> component video/Submit:uploads) was not handled; you must provide a
> matching event handler method in the component or in one of its containers"
>         Do you have any idea how to handle this in Tapesrty 5.1 , as I had
> to change the component's code to T 5.1  ?
>
> 2.Yes that's ok ... I tested Apache Tika to get the Mime type and it works
> fine , I will use it to validate the file content type.
>
> 3.i'm using the latest code for ajax upload on
> https://github.com/tawus/tawus/tree/master/tawus-ajaxupload , and IE
> 8...no java script error ...and when investigating the page source I found
> this:
>
> <fieldset class="field file">
>         <input name="uploads"
> style="display:inline;color:transparent;background:transparent;border:0;height:1px;width:1px;"
> id="uploads" type="text"></input>
>         <span style="display:inline-block" id="uploads_wrapper"></span>
>         <img id="uploads-icon" class="t-error-icon t-invisible" alt=""
> src="/readers-page/assets/tapestry/5.1.0.5/spacer.gif"/>
> </fieldset>
>
>
> I really appreciate your help ..
>
>
> -----Original Message-----
> From: Ray Nicholus [mailto:rnicholus@widen.com]
> Sent: 09 سبتمبر, 2012 07:48 م
> To: Tapestry users
> Subject: Re: Ajax Upload for Tapestry
>
> 2. The only other option is for the upload library to set a more specific
> the content type based on the file extension.  Even in this case you would
> need to formally identify the file server-side, since there is no guarantee
> that this type is correct.
>
> 3.  You'll have to provide more details, such as code, file-uploader
> "version",etc
>
> On Sep 9, 2012 3:47 AM, "Amr Mohamed Mahmoud Hassanien" <
> amr.hassanien@ey.ae>
> wrote:
>
> > Dear Taha, Tapestry users,
> >
> > I checked out the Ajax upload for tapestry, that Taha thankfully made
> > it from the file upload component.
> >
> > http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
> >
> > I have some problems with the component if anyone can help:
> >
> >
> > 1.      I have changed the code to fit in my Tapestry 5.1 project, All
> > works fine but the method onRemoveUpload() of AjaxUpload.java
> >
> > void onRemoveUpload(@RequestParameter("serverIndex") int serverIndex)
> >    {
> >                               ...
> >                }
> >
> > The RequestParameter annotation does not exist in tapestry 5.1 . I
> > thought in Tapestry 5.1 it works by just removing the annotation but it
> didn't work.
> >
> >
> > 2.  I use this component to upload video files, mainly, so as part of
> > my validation I have to check the MIMETYPE, The content type of the
> > file is always application/octet-stream , Is there any work around this?
> >
> > 3.      I 've learned that the component switches automatically to iframe
> > for non-ajax upload supporting browsers like IE, I am using IE8 and
> > the component is not showing up at all. Do you have any idea why?
> >
> > Please if anyone could help in any of these points , kidly reply to my
> > email
> >
> > Thanks and Regards,
> >
> > Amr Hassanin
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Ajax Upload for Tapestry

Posted by Ray Nicholus <rn...@widen.com>.
Yikes, that is really, REALLY old code, as far as the uploader js library
is concerned.  I'm afraid you won't find much support for such an old
version of that library.  The file-uploader js library, now called Fine
Uploader lives on the valums/file-uploader github project page at
https://github.com/valums/file-uploader.  I'm not sure the Tapestry
component will work with this version or not since I haven't spent much
time looking at the Tapestry component you referenced.

On Tue, Sep 11, 2012 at 6:46 AM, Amr Mohamed Mahmoud Hassanien <
amr.hassanien@ey.ae> wrote:

> Hi Ray,
>
> Thanks for your reply.
>
>
> 1.For the first point, I get this error on click remove for any attachment.
> "Communication with the server failed: Request event 'removeupload' (on
> component video/Submit:uploads) was not handled; you must provide a
> matching event handler method in the component or in one of its containers"
>         Do you have any idea how to handle this in Tapesrty 5.1 , as I had
> to change the component's code to T 5.1  ?
>
> 2.Yes that's ok ... I tested Apache Tika to get the Mime type and it works
> fine , I will use it to validate the file content type.
>
> 3.i'm using the latest code for ajax upload on
> https://github.com/tawus/tawus/tree/master/tawus-ajaxupload , and IE
> 8...no java script error ...and when investigating the page source I found
> this:
>
> <fieldset class="field file">
>         <input name="uploads"
> style="display:inline;color:transparent;background:transparent;border:0;height:1px;width:1px;"
> id="uploads" type="text"></input>
>         <span style="display:inline-block" id="uploads_wrapper"></span>
>         <img id="uploads-icon" class="t-error-icon t-invisible" alt=""
> src="/readers-page/assets/tapestry/5.1.0.5/spacer.gif"/>
> </fieldset>
>
>
> I really appreciate your help ..
>
>
> -----Original Message-----
> From: Ray Nicholus [mailto:rnicholus@widen.com]
> Sent: 09 سبتمبر, 2012 07:48 م
> To: Tapestry users
> Subject: Re: Ajax Upload for Tapestry
>
> 2. The only other option is for the upload library to set a more specific
> the content type based on the file extension.  Even in this case you would
> need to formally identify the file server-side, since there is no guarantee
> that this type is correct.
>
> 3.  You'll have to provide more details, such as code, file-uploader
> "version",etc
>
> On Sep 9, 2012 3:47 AM, "Amr Mohamed Mahmoud Hassanien" <
> amr.hassanien@ey.ae>
> wrote:
>
> > Dear Taha, Tapestry users,
> >
> > I checked out the Ajax upload for tapestry, that Taha thankfully made
> > it from the file upload component.
> >
> > http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
> >
> > I have some problems with the component if anyone can help:
> >
> >
> > 1.      I have changed the code to fit in my Tapestry 5.1 project, All
> > works fine but the method onRemoveUpload() of AjaxUpload.java
> >
> > void onRemoveUpload(@RequestParameter("serverIndex") int serverIndex)
> >    {
> >                               ...
> >                }
> >
> > The RequestParameter annotation does not exist in tapestry 5.1 . I
> > thought in Tapestry 5.1 it works by just removing the annotation but it
> didn't work.
> >
> >
> > 2.  I use this component to upload video files, mainly, so as part of
> > my validation I have to check the MIMETYPE, The content type of the
> > file is always application/octet-stream , Is there any work around this?
> >
> > 3.      I 've learned that the component switches automatically to iframe
> > for non-ajax upload supporting browsers like IE, I am using IE8 and
> > the component is not showing up at all. Do you have any idea why?
> >
> > Please if anyone could help in any of these points , kidly reply to my
> > email
> >
> > Thanks and Regards,
> >
> > Amr Hassanin
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Ajax Upload for Tapestry

Posted by Taha Siddiqi <ta...@gmail.com>.
Instead of using @RequestParameter, @Inject Request and use request.getParameter("serverIndex")

I have used it with IE6 and IE7 and it worked. Not sure what the error can be particularly with IE :) 

WIth IE I debug less and pray more :)

Regards
Taha

On Sep 11, 2012, at 5:16 PM, Amr Mohamed Mahmoud Hassanien wrote:

> Hi Ray,
> 
> Thanks for your reply.
> 
> 
> 1.For the first point, I get this error on click remove for any attachment. 
> "Communication with the server failed: Request event 'removeupload' (on component video/Submit:uploads) was not handled; you must provide a matching event handler method in the component or in one of its containers"
> 	Do you have any idea how to handle this in Tapesrty 5.1 , as I had to change the component's code to T 5.1  ?
> 
> 2.Yes that's ok ... I tested Apache Tika to get the Mime type and it works fine , I will use it to validate the file content type.
> 
> 3.i'm using the latest code for ajax upload on https://github.com/tawus/tawus/tree/master/tawus-ajaxupload , and IE 8...no java script error ...and when investigating the page source I found this:
> 
> <fieldset class="field file">
> 	<input name="uploads" style="display:inline;color:transparent;background:transparent;border:0;height:1px;width:1px;" id="uploads" type="text"></input>
> 	<span style="display:inline-block" id="uploads_wrapper"></span>
> 	<img id="uploads-icon" class="t-error-icon t-invisible" alt="" src="/readers-page/assets/tapestry/5.1.0.5/spacer.gif"/>
> </fieldset>
> 
> 
> I really appreciate your help ..
> 
> 
> -----Original Message-----
> From: Ray Nicholus [mailto:rnicholus@widen.com] 
> Sent: 09 سبتمبر, 2012 07:48 م
> To: Tapestry users
> Subject: Re: Ajax Upload for Tapestry
> 
> 2. The only other option is for the upload library to set a more specific the content type based on the file extension.  Even in this case you would need to formally identify the file server-side, since there is no guarantee that this type is correct.
> 
> 3.  You'll have to provide more details, such as code, file-uploader "version",etc 
> 
> On Sep 9, 2012 3:47 AM, "Amr Mohamed Mahmoud Hassanien" <am...@ey.ae>
> wrote:
> 
>> Dear Taha, Tapestry users,
>> 
>> I checked out the Ajax upload for tapestry, that Taha thankfully made 
>> it from the file upload component.
>> 
>> http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
>> 
>> I have some problems with the component if anyone can help:
>> 
>> 
>> 1.      I have changed the code to fit in my Tapestry 5.1 project, All
>> works fine but the method onRemoveUpload() of AjaxUpload.java
>> 
>> void onRemoveUpload(@RequestParameter("serverIndex") int serverIndex)
>>   {
>>                              ...
>>               }
>> 
>> The RequestParameter annotation does not exist in tapestry 5.1 . I 
>> thought in Tapestry 5.1 it works by just removing the annotation but it didn't work.
>> 
>> 
>> 2.  I use this component to upload video files, mainly, so as part of 
>> my validation I have to check the MIMETYPE, The content type of the 
>> file is always application/octet-stream , Is there any work around this?
>> 
>> 3.      I 've learned that the component switches automatically to iframe
>> for non-ajax upload supporting browsers like IE, I am using IE8 and 
>> the component is not showing up at all. Do you have any idea why?
>> 
>> Please if anyone could help in any of these points , kidly reply to my 
>> email
>> 
>> Thanks and Regards,
>> 
>> Amr Hassanin
>> 
> 
> ---------------------------------------------------------------------
> 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: Ajax Upload for Tapestry

Posted by Amr Mohamed Mahmoud Hassanien <am...@Ey.ae>.
Hi Ray,

Thanks for your reply.


1.For the first point, I get this error on click remove for any attachment. 
"Communication with the server failed: Request event 'removeupload' (on component video/Submit:uploads) was not handled; you must provide a matching event handler method in the component or in one of its containers"
	Do you have any idea how to handle this in Tapesrty 5.1 , as I had to change the component's code to T 5.1  ?

2.Yes that's ok ... I tested Apache Tika to get the Mime type and it works fine , I will use it to validate the file content type.

3.i'm using the latest code for ajax upload on https://github.com/tawus/tawus/tree/master/tawus-ajaxupload , and IE 8...no java script error ...and when investigating the page source I found this:

<fieldset class="field file">
	<input name="uploads" style="display:inline;color:transparent;background:transparent;border:0;height:1px;width:1px;" id="uploads" type="text"></input>
	<span style="display:inline-block" id="uploads_wrapper"></span>
	<img id="uploads-icon" class="t-error-icon t-invisible" alt="" src="/readers-page/assets/tapestry/5.1.0.5/spacer.gif"/>
</fieldset>


I really appreciate your help ..


-----Original Message-----
From: Ray Nicholus [mailto:rnicholus@widen.com] 
Sent: 09 سبتمبر, 2012 07:48 م
To: Tapestry users
Subject: Re: Ajax Upload for Tapestry

2. The only other option is for the upload library to set a more specific the content type based on the file extension.  Even in this case you would need to formally identify the file server-side, since there is no guarantee that this type is correct.

3.  You'll have to provide more details, such as code, file-uploader "version",etc 

On Sep 9, 2012 3:47 AM, "Amr Mohamed Mahmoud Hassanien" <am...@ey.ae>
wrote:

> Dear Taha, Tapestry users,
>
> I checked out the Ajax upload for tapestry, that Taha thankfully made 
> it from the file upload component.
>
> http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
>
> I have some problems with the component if anyone can help:
>
>
> 1.      I have changed the code to fit in my Tapestry 5.1 project, All
> works fine but the method onRemoveUpload() of AjaxUpload.java
>
> void onRemoveUpload(@RequestParameter("serverIndex") int serverIndex)
>    {
>                               ...
>                }
>
> The RequestParameter annotation does not exist in tapestry 5.1 . I 
> thought in Tapestry 5.1 it works by just removing the annotation but it didn't work.
>
>
> 2.  I use this component to upload video files, mainly, so as part of 
> my validation I have to check the MIMETYPE, The content type of the 
> file is always application/octet-stream , Is there any work around this?
>
> 3.      I 've learned that the component switches automatically to iframe
> for non-ajax upload supporting browsers like IE, I am using IE8 and 
> the component is not showing up at all. Do you have any idea why?
>
> Please if anyone could help in any of these points , kidly reply to my 
> email
>
> Thanks and Regards,
>
> Amr Hassanin
>

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


Re: Ajax Upload for Tapestry

Posted by Ray Nicholus <rn...@widen.com>.
2. The only other option is for the upload library to set a more specific
the content type based on the file extension.  Even in this case you would
need to formally identify the file server-side, since there is no guarantee
that this type is correct.

3.  You'll have to provide more details, such as code, file-uploader
"version", etc
On Sep 9, 2012 3:47 AM, "Amr Mohamed Mahmoud Hassanien" <am...@ey.ae>
wrote:

> Dear Taha, Tapestry users,
>
> I checked out the Ajax upload for tapestry, that Taha thankfully made it
> from the file upload component.
>
> http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
>
> I have some problems with the component if anyone can help:
>
>
> 1.      I have changed the code to fit in my Tapestry 5.1 project, All
> works fine but the method onRemoveUpload() of AjaxUpload.java
>
> void onRemoveUpload(@RequestParameter("serverIndex") int serverIndex)
>    {
>                               ...
>                }
>
> The RequestParameter annotation does not exist in tapestry 5.1 . I thought
> in Tapestry 5.1 it works by just removing the annotation but it didn't work.
>
>
> 2.  I use this component to upload video files, mainly, so as part of my
> validation I have to check the MIMETYPE, The content type of the file is
> always application/octet-stream , Is there any work around this?
>
> 3.      I 've learned that the component switches automatically to iframe
> for non-ajax upload supporting browsers like IE, I am using IE8 and the
> component is not showing up at all. Do you have any idea why?
>
> Please if anyone could help in any of these points , kidly reply to my
> email
>
> Thanks and Regards,
>
> Amr Hassanin
>