Big files uploading (WebException: The connection was closed unexpectedly)

后端 未结 4 808
广开言路
广开言路 2021-02-06 08:12

UPDATED

See post #3 below.

There is a need to upload a file to the web automatically (without browser). Host - Mini File Host v1.2 (if this does

4条回答
  •  轮回少年
    2021-02-06 08:34

    In my case, duplicate filename causing the issue as well. I save the file's settings in an xml file but the name setting is duplicating each other.

          
            isp_main_
            308
            1080
            1080
          
          
            isp_thumb_ // pay attention to this
            308
            506
            506
          
          
            isp_thumb_ // and this
            306
            506
            506
          
    

    And, in the other case I had, the issue is in the file length. Please do check the allowed file size on your server. In your script just do check this part :

    dataStream.Write(filesBytesArray, 0, filesBytesArray.Length);
    dataStream.Close();
    

    And if you dont know, just limit the file uploaded size in your frontend section ie. HTML upload element, this is good reference for limiting file size and other filter.

提交回复
热议问题