-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
improve falcon form data read part #249
Comments
Keeping two releases is hard 😢 Will release v1 and improve this later. |
@kemingy I'm happy to help or at least advise, but could you shed some light on Spectree's design wrt my questions above. What type of data from a multipart form is typically sent to the validator? |
Thanks! Here is the current implementation for the form file type: Lines 173 to 192 in 3deaf00
In my option, I would prefer to leave the large form body to falcon (since it's already there). I feel SpecTree doesn't really "validate" the body. I wonder if SpecTree should provide a struct that when users try to read it, users actually read from falcon. Buffering it to a temp file also looks good. |
I see. Falcon offers parsing on-the-fly without buffering anything anywhere, so spooling to a temp file should be built in the Spectree plugin, if this is desired. Because iterating to the next part will force the stream to be read through (and discarded if the data is not used). Alternatively one could potentially pause iteration at the part of interest, and hand that off to Spectree, since from what I've seen validation doesn't support multiple files, or does it? But not sure if such approach wouldn't cause confusion either. |
Originally posted by @vytas7 in #225 (comment)
The text was updated successfully, but these errors were encountered: