Currently a user cannot specify what is the maximum size of a single file that is allowed or combined size of multiple files that are uploaded or restrict the number of files that are uploaded upfront. By upfront I mean that, currently a user would do the following to read a multipart form upload request:
MultipartFormDataStreamProvider provider = await request.Content.ReadAsMultipartAsync<MultipartFormDataStreamProvider>(new MultipartFormDataStreamProvider(@"C:\UploadedFiles"));
After the above statement is executed, it causes all the files to be read and are stored in the UploadedFiles directory.
Only later can the user can go through each file to do his validation. It would be nice if we provide a way for users to specify validation settings regarding this.
MultipartFormDataStreamProvider provider = await request.Content.ReadAsMultipartAsync<MultipartFormDataStreamProvider>(new MultipartFormDataStreamProvider(@"C:\UploadedFiles"));
After the above statement is executed, it causes all the files to be read and are stored in the UploadedFiles directory.
Only later can the user can go through each file to do his validation. It would be nice if we provide a way for users to specify validation settings regarding this.