This is a migrated thread and some comments may be shown as answers.

POST firing before completion

2 Answers 86 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Minh
Top achievements
Rank 1
Minh asked on 08 Sep 2020, 03:18 PM

Unsure if this is related to uploading large files considering the issue is not seen when uploading <500mb files but when attempting to upload a 600mb file, the POST method is firing before the file even reaches 50% upload resulting in a null IEnumerable<IFormFile>. When the file does finish its upload, the completion handler fires immediately.

 

Thanks,

Minh

2 Answers, 1 is accepted

Sort by
0
Minh
Top achievements
Rank 1
answered on 08 Sep 2020, 03:27 PM
Image attached which hopefully explains the issue a lot easier.
0
Minh
Top achievements
Rank 1
answered on 08 Sep 2020, 04:51 PM

Looks like I was hasty with this post. Adding a the "MultipartBodyLengthLimit" attribute to the POST method fixed the issue.

 

[RequestFormLimits(ValueLengthLimit = int.MaxValue, MultipartBodyLengthLimit = int.MaxValue)]

Tags
Upload
Asked by
Minh
Top achievements
Rank 1
Answers by
Minh
Top achievements
Rank 1
Share this question
or