I am utilizing angular-file-upload to upload a file in my AngularJS app.
There are two uploads:
- upload OK
Content-Length: 3515744
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryBw0EMfNfB9biF4Kn
Content-Disposition: form-data; name="file"; filename="x.mp4"
Content-Type: video/mp4
- upload error 500
Content-Length: 4551690
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryPW4QWcJZAlYPBOb6
Content-Disposition: form-data; name="file"; filename="y.mp4"
Content-Type: video/mp4
ExceptionMessage: "Sequence contains no elements" ExceptionType: "System.InvalidOperationException"
code
var provider = new MultipartFormDataStreamProvider(root);
var task = Request.Content.ReadAsMultipartAsync(provider).
ContinueWith<HttpResponseMessage>(o =>
{
MultipartFileData file = (MultipartFileData)provider.FileData.First();
- request
provider.FileData.Count = 1
- request
provider.FileData.Count = 0
web.config
<requestLimits maxAllowedContentLength="2147483647" />
<fileExtensions>
<add fileExtension=".mp4" allowed="true" />
</fileExtensions>
Where can I adjust the limit?