uploading a file via Ajax
It is not possible.
Lol, well, ok.... the XMLHttpRequest cannot send multipart/form-data, therefore, cannot upload files. There are two ways around this:
1) use an iframe. This can be transparent, e.g. using the dojo.io.bind will do it automatically.
2) use a pixel Flash movie. You can create a 1 pixel flash movie, interface with it using the external interface (Flash 8 required), and use the Flash buffer classes (Flash 9 required) to upload the file. The nice thing about this is that you get the total bytes transferred count, thus you can display an accurate progress bar.
I'll try to post an example of both options soon.
http://www.robgonda.com/blog/trackback.cfm?CCE336CD-3048-7431-E421AD35CE80223B
There are no comments for this entry.
[Add Comment]