1

I have an ajax upload using file-input that works perfectly for even medium sized uploads (ex: 12mb works fine). However, with a large upload (ex: 40mb) it is either not passing the "extra" form data, or the server-side code (classic ASP) is trying to process them before the upload is complete and the data is passed?

The js is as follows:

$('#file').fileinput({   
  maxFileSize:  45000 ,
  maxFileCount: 1,
  required: true,
  uploadUrl: 'ajax_upload.asp?',
  uploadAsync: false,
  dropZoneEnabled: false,
  uploadExtraData: function (previewId, index) {
      //get checkbox values
      var strShowTo = ''
      showToUserIDs: $("input[name=showToUserIDs]").val(),
      $("input[name='showToUserIDs']").each(function () {
          if ($(this).is(':checked')) {
              thisValue = $(this).val()
              strShowTo = strShowTo + thisValue + ',';
          }
      });
      var formData = new FormData();
      var formData = {
          privateFolder: $('select[name="privateFolder"] option:selected').val(),
          title: $("input[name=title]").val(),
          sendEmailNotices: $("input[name=sendEmailNotices]").val(),
          body: $("input[name=description]").val(),
          showToUserIDs: strShowTo
      };
      return formData;
  },
  });

I dont think its a server setting issue as I have already set the Maximum Requesting Entity Body Limit to 100mb and the Request Filtering / Edit Feature Settings / Maximum allowed content length to 100mb.

enter image description here enter image description here

When I upload a large file, all of the uploadExtraData values are "" in the server-side code. However, they are being listed in the "form data" section of the network inspector in Chrome:

enter image description here

Digital Fusion
  • 165
  • 4
  • 19
  • 2
    The max filesize value in your javascript is set to 45000kb (45mb) – Adam Feb 13 '19 at 18:28
  • That would not stop a 40mb file from being uploaded. – Digital Fusion Feb 14 '19 at 19:18
  • You weren't very clear on the size of the files you are trying to upload, you just specified "large" with an example of 40mb. And given you didn't provide any server side code nobody would have been able to identify the actual cause of the problem. – Adam Feb 14 '19 at 22:02

1 Answers1

0

It turned out that the server side code was using a component (Motobit ASP Upload) that was setting the max form size to 15mb

Dim Form: Set Form = Server.CreateObject("ScriptUtils.ASPForm")
Form.SizeLimit = 12*&H100000
Digital Fusion
  • 165
  • 4
  • 19