jeudi 22 janvier 2015

FineUploaderS3 (4.4) Accept Header in Firefox

I'm having a problem with FineUploader 4.4 in Firefox. As you know, Firefox sends the following HTTP accept header by default:



Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8


But since AmazonS3 returns JSON data after I upload a file via POST with FineUploader, I need to override FineUploader to send an application/json Accept header:



$('#demoUploader').fineUploaderS3({
autoUpload: true,
request: {
endpoint: "http://ift.tt/1CVngkF",
accessKey: "AKIAJ4VQLGW68A2Y6JLQ",
customHeaders: { 'Accept': 'application/json' }
},
... etc


But this is not working. FineUploaderS3 ignores my customHeader option and still sends the default Accept header. What am I doing wrong?





Aucun commentaire:

Enregistrer un commentaire