-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multipart/form-data upload forms #1
Comments
This is now a blocker for simonw/datasette-upload-csvs#11 |
I think the way to do this is to consume the body up to finding the It will be up to template authors to ensure the |
I'll ship this as 1.0. |
I'd already decided on that approach in the comments: Lines 136 to 139 in 245d8ba
|
I'll need to add a dependency on |
From careful reading of https://github.com/andrew-d/python-multipart/blob/b3e7b45d2e2e90281421fb5c00a0b7f4b402d02c/multipart/multipart.py I think I know how to do this. Here's where a # Instantiate a form parser.
form_parser = FormParser(content_type,
on_field,
on_file,
boundary=boundary,
file_name=file_name,
config=config) But that class takes an optional
This is only written to the moment a file upload chunk starts to be processed. So... I can pass in my own implementation of |
I'm going to ship this as an alpha release so I can test it. |
I'm going for 100% test coverage to ensure this is well tested: #13 |
This is tricky because I'd like to avoid consuming the entire upload body into memory just to check the token. Ideally this would work with streaming the data somehow.
The text was updated successfully, but these errors were encountered: