ProgerXP / FileDrop

Self-contained cross-browser pure JavaScript class for Drag & Drop and AJAX (multi) file upload.
filedropjs.org
The Unlicense
264 stars 61 forks source link

* uses local type instead of application/octet-stream #16

Closed yogasantosa closed 10 years ago

yogasantosa commented 10 years ago

At server-side, Content type always come up with 'application/octet-stream'. Would be nice (useful?) to copy across the local type.

ProgerXP commented 10 years ago

There has been a discussion on this in #14. Basically it's used to prevent browser from converting encoding or whatever (thanks IE). If you want to override this header use xhrSetup event that occurs after FileDrop sets up all headers. But I would recommend you to pass the type in X-File-Type or other extra header (I might add this header on next update actually as it looks useful).

yogasantosa commented 10 years ago

Thanks for replying - sorry didnt check for existing discussion. I understand where you're coming from.

xhrSetup works to some extend - but if I do setRequestHeader there - it'll add to existing content type instead of overwriting it. That's fine though - I'll work it out. Cheers.