I need an upload system which uploads to a specific preset URL based on its filetype, for example:
images will be uploaded to “exampleserver.com/upload/image” and videos will be uploaded to “exampleserver.com/upload/video”.
I had a look at http://blueimp.github.com/jQuery-File-Upload/ but I couldn’t manage to modify the code (might be lack of experience in JQuery plugins)
The upload system does need to support multiple file selection and be cross-browser compatible (with the exception of IE6).
Any suggestions or modifications to the code of the Jquery file upload plugin mentioned above are greatly appreciated.
EDIT: the server where images and videos are uploaded to are NOT mine, they are Facebook’s.
For this to work your client’s need to have HTML5 support, File, FileList and Blob. You can see a demo how this works.
Changing the settings in the uploader is quite simple: (documentation find “Options” )
I would suggest you submit images and videos to the same locations and make the check on the server side. That will make your life much easier.
Edit:
Here is how you can check the extension and submit images and videos to different scripts: