Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Sample: Issues with Antiforgery + Form + File Uploads #4533

Closed
rynowak opened this issue Apr 26, 2016 · 2 comments
Closed

Sample: Issues with Antiforgery + Form + File Uploads #4533

rynowak opened this issue Apr 26, 2016 · 2 comments
Assignees

Comments

@rynowak
Copy link
Member

rynowak commented Apr 26, 2016

So, given the work to add size limits to form (aspnet/HttpAbstractions#618) we're going to want the ability to configure and bypass these limits per-action/controller.

There's a few scenarios we have in mind here:

  1. I have a restrictive limit set app wide to limit things by default to really small inputs. But, I want to increase the limit for a specific action. (maybe for a big form post or for file uploads)
  2. I have an action that's going to accept a really large file upload - usually as an ajax action. I want to completely bypass the default buffering behavior of FormFeature and stream this directly to my storage.

We need a few specific things from MVC to support everything here we want to do:
[ ] - Make value providers lazy - #4531 - (prevent MVC from reading the form if you have no model binding)
[ ] - Create a filter/sample that removes the form value provider - #4534 - (prevent MVC from reading the form at all)
[ ] - Create a filter/sample that sets the limits on FormFeature - #4535 - (prevent antiforgery from reading the form while a 'low' limit is still in effect)


E2E Sample
Furthermore we want an end-to-end sample of using MVC to stream a large file upload. This will include a combination of the above, and using MultipartReader + Antiforgery Header Token which are already supported.

@rynowak
Copy link
Member Author

rynowak commented Apr 26, 2016

/cc @Tratcher

@kichalla
Copy link
Member

86147eda46a476b8acc409df0eaa9b0eca730e94

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants