Ajax upload file is still pain in the ass.
I have tested
http://blueimp.github.com/jQuery-File-Upload/
https://github.com/valums/file-uploader
I need a uploader that is triggered by JS (not after pick the file)
And it is very painful
callbacks, documentation, examples
By using XHR request but not iframe,
server side cannot use $_FILES, need sth like stream_copy_to_stream()
cannot send data with other parameters, like custom ID, title etc
WTF
And i need to build much more extra logic after saving the file,
like rename the file to hash (prevent hot linking)
save file related information to DB, which the example class do not provides...
JUST FOR A SIMPLE AJAX FILE UPLOAD.
I gave up.