I've gotten blue-imp file uploader to work just fine on desktop browsers but am having problems with it uploading images from an iphone. In particular, after selecting a file, the code silently fails: since I have an alert which isn't popping up (File added), it looks like the add callback isn't being triggered. Any suggestions would be appreciated!
My jquery:
$(function () {
'use strict';
$('#fileupload').fileupload({
maxChunkSize: 10000000,
url: 'third-party-uploader/init-third-party-uploader',
dataType: 'json',
maxRetries: 10,
retryTimeout: 500,
add: function (e, data) {
alert('File added.');
var that = this;
$.getJSON(getUrl() + 'third-party-uploader/get-uploaded-bytes', {file: data.files[0].name}, function (result) {
data.uploadedBytes = result.size;
$.blueimp.fileupload.prototype.options.add.call(that, e, data);
});
},
fail: function (e, data) {
alert('Whoops!');
},
done: function (e, data) {
alert('Finished');
},
progress: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
$('#progress .progress-bar').css(
'width',
progress + '%'
);
}
}).prop('disabled', !$.support.fileInput)
.parent().addClass($.support.fileInput ? undefined : 'disabled');
});