Hi Rich, u might try this Project. https://github.com/valums/file-uploader

Demo: http://valums.com/files/2010/file-uploader/demo.htm
I have used it successfully in a few Tap5 projects and was not that
hard to integrated. Sadly i haven't had the time to release it as a
standalone tap module. It even supports HTML5 Drag&Drop and falls back
to JS if not supported.

Greetings

On Fri, Mar 11, 2011 at 9:17 PM, Thiago H. de Paula Figueiredo
<thiag...@gmail.com> wrote:
> File uploading doesn't work with AJAX without faking it using iframes or
> using Flash. It doesn't matter if you're using Tapestry or not, this is a
> limitation of AJAX itself. See this:
> http://stackoverflow.com/questions/543926/is-it-possible-to-use-ajax-to-do-file-upload.
>
>
> On Fri, 11 Mar 2011 16:40:43 -0300, Rich M <rich...@moremagic.com> wrote:
>
>> Hi,
>>
>> I've been working on Image file upload and display. With the help of a
>> previous thread, I was able to get a fully working test component that could
>> have a client upload a file from a form, and then have the file saved on the
>> server and rendered back to the client in the browser.
>>
>> I've moved on to integration of this concept into my actual application.
>> I'm having an issue capturing the UploadedFile in any event handlers on a
>> page where the form is within a Zone. The form is also within a Block that
>> is delegated in case that factors in at all.
>>
>> When the form is submitted, the UploadedFile object is null, and thus I
>> cannot handle the object.
>>
>> In my test component, the UploadedFile object resolves to a reference to
>> the Image file uploaded by the client (had they uploaded one and no
>> exception occurred). I did another sanity check by integrating the upload
>> component into another form for the same Entity in my application that is
>> not within a Zone or Block. The UploadedFile object was valid in this page
>> as well after form submit, leaving me to think there is something about the
>> Zone or Block that is interfering with the results I expected.
>>
>> This is how I have been using the Upload component
>>
>> Page:
>>
>> @Property
>> private UploadedFile uploadedFile;
>>
>> public void onSuccess(){
>>     if(uploadedFile == null){
>>         log.debug("Image file was not provided");
>>     }else{
>>         imageManager.saveImage(uploadedFile);
>>     }
>> }
>>
>> TML:
>>
>> <input t:type="upload" t:id="uploadedFile" />
>>
>> Also since I'd had a couple threads recently where I had forgot to use the
>> t:zone attribute properly, I tried out t:zone on the upload component to
>> sanity check that as well, but that did not appear to change anything.
>>
>> Is anyone familiar with what challenge(s) I may be facing here in getting
>> the upload to work?
>>
>> Thanks,
>> Rich
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
> Coordenador e professor da Especialização em Engenharia de Software com
> Ênfase em Java da Faculdade Pitágoras
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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

Reply via email to