I've had the following code working for quite a while now (over a year) but a user has tried to upload a 14MB file and the extra data I post along with the upload seems to not get posted anymore.
In Chrome dev tools I look at the header of the (single) XHR and I see the data in the "Form data" section but nothing get's to the server which I don't understand.
Files that are a few MB or smaller work without issue. I've not found a magic MB limit yet.
The extra data is in the onUpload call back. board_hash is in the head of page.
var fu_instance = new qq.FineUploader(
{
element: $uploader[0],
template: 'agenda_file_template',
debug: true,
request: {
endpoint: '/m/upload',
forceMultipart: false,
customHeaders: {
Accept: 'application/json'
}
},
autoUpload: false,
messages:
{
noFilesError: "There is no files to upload. Select or drag and drop some files to upload.",
},
failedUploadTextDisplay:
{
mode: 'custom',
responseProperty: 'error'
},
callbacks:
{
onSubmit: function(id, filename)
{
// File added to upload
$uploader.addClass('hide-drop-msg');
$btn_submit_upload.html('Upload').show();
unsaved = true;
},
onUpload: function(id, name)
{
fu_instance.setParams({'board_hash': board_hash, 'parent': $parent.val()});
},
onCancel: function(id, name)
{
// Actually onBeforeCancel
if ($uploader.find('ul.qq-upload-list li').length == 1)
{
// There is currently 1 & it's about to be axed
$uploader.removeClass('hide-drop-msg');
$btn_reset_uploads.hide();
$btn_submit_upload.html('Upload').show();
unsaved = false;
}
},
onError: function(id, name, reason, resp)
{
// Specific file error
if (resp.hasOwnProperty('auth_expired'))
{
window.location.href = auth_url;
}
},
onComplete: function(id, name, resp)
{
if (resp.success)
{
var $parent_el = $('#'+$parent.val());
$parent_el.find('.files').append(resp.html);
$parent_el.find('.no-agenda-files').hide();
}
},
onAllComplete: function(succeeded, failed)
{
// Every file is done
$btn_submit_upload.hide();
$btn_reset_uploads.show();
unsaved = false;
}
}
});
My understanding is that chunking is off by default. Have I configured this wrong or am I in the wrong call back?