On 04 May 2007, at 04:26, Srini wrote:

> Our application is developed using classic ASP and prototype JS to
> handle ajax calls.
> We are trying to implement asynchronous file uploading , but it's not
> working.
>
> Can you guys guide us here.
>
> <FORM method="post" encType="multipart/form-data" action="/
> SaveInputpics.asp">
>
>
> Thanks in advance.

This has come up some many times on this list already, but here we go:

JavaScript security doesn't allow access to the local filesystem, so  
you can't upload files using AJAX. You can however let the user get  
the impression the files are uploaded through AJAX.

A few possibilities:
• Using a hidden iframe to post the file to, the iframe will handle  
the upload and it's a normal HTTP request. If you want upload  
progress, you'll have to use a periodical updater to poll the  
progress on the server.
• Use SWFUpload (http://swfupload.mammon.se/), my personal  
preference, even though the user will need Flash. The advantage is  
that you can do all of the filtering (filetypes, max size, …)  
clientside and the upload progress is handled by the Flash file (it  
monitors the progress of the stream). One of the apps I'm using it in  
can be found over here (make sure you upload a picture > 800 KB if  
you want to see the upload progress): http://demo.placid.be/albums/ 
2;manage


Best regards

Peter De Berdt


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to