PDA

View Full Version : file uploads with ajax?


godofreality
06-03-2009, 06:19 PM
i have been trying to upload files using ajax to no avail so i did sum searching and it seems it is not possible so i was wondering if any1 has found a way to do it with ajax and if so could u help me out with it

rnd me
06-04-2009, 09:21 AM
it's only possible in firefox3 as far as i know.

is that enough for you to want the code?

godofreality
06-04-2009, 09:23 AM
heck yes give me the code lol no j/k i am just gonna try a work around just having issues with a status bar i really cannot figure out how to make that happen

rnd me
06-04-2009, 10:36 AM
well i thought this would be popular, but i couldn'd find anything on google.

so, i'll have to whip something up myself, but it's 3:30am here, so you'll have to wait until tommorow after work.

basically i will combine something like the uploader part of
http://www.captain.at/ajax-file-upload.php (it's file code needs about:config changes, screw that)

with the kind of file-access code in
http://soakedandsoaped.com/articles/read/firefox-3-native-ajax-file-upload (needs uploader ajax code)


i'm surprised this hasn't been done already...

A1ien51
06-04-2009, 02:30 PM
Most file uploads people think are Ajax are really flash based. If you do not want to go the flash route you would have to post your form to a hidden iframe.

Most of the work in the past with uploads have been done with progress bars. A google search of file upload with progress Ajax would probably turn up info.

Eric

rnd me
06-05-2009, 01:49 AM
Most file uploads people think are Ajax are really flash based. If you do not want to go the flash route you would have to post your form to a hidden iframe.

not in firefox3...

But it's a good point that if you are catching uploads in PHP, it might be better to use PHP all the way.

Still, i think a true js-only uploader would be useful.
I also want it to be able to PUT files, so you wouldn't need a server script at all...

A1ien51
06-05-2009, 06:23 AM
Yeah it is great you can do it with ff3, but 90% of the world is not using FF3. :)

Gmail uses flash