0

I'm working on a drag and drop file application. My uploads always work if they are less than 16mb, but if they are more, the ajax request never gets sent (no POST entry in firebug). I find this is true even when I use a library to accomplish the task (plupload, for example). I can upload large files using a plain old form submission.

I could use chunking to solve this, but then I have to reassembled to file after the last chunk is completed and that seems like more work.

Any ideas?

$(document).on('drop', function(){  
  e.preventDefault();
  var xhr = new XMLHttpRequest();  
  attachment_form = document.getElementById('brief_form')

  form = new FormData(attachment_form)
  form.append('attachents[0][image]',e.originalEvent.dataTransfer.files[0] )

  url = $(attachment_form).attr("action")
  text = ''
  xhr.open("POST", url)
  xhr.setRequestHeader("Accept", "text/javascript");
  xhr.send(form)
})
recursive_acronym
  • 2,981
  • 6
  • 40
  • 59

1 Answers1

0

As it turns out Firebug is to blame. At the very least disabling it for my development site made the problem disappear.

It would have been nice if it at least gave some kind of warning.

recursive_acronym
  • 2,981
  • 6
  • 40
  • 59