-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
File Upload to HTTP Server with Multipart Form #1590
Comments
Any browser-defined Javascript functions will map 1-to-1 to some mechanism inside the |
Yeah thanks, I realise its possible to do by calling the appropriate Javascript functions directly, but I was already using the Yew Fetch API for all my other API routes. |
I'll try and work out how to handle larger files (file uploads are not something I'm particularly experienced with) and add it to the documentation! |
There is actually an issue open for this already |
Cool – I guess we can close this one and keep only that one then? |
Question
I can see there is an example of file uploads however I am not sure how I upload a file to a HTTP server in a multipart form?
In the JS world I would send a FormData body (I'm assuming that browsers would then typically stream the file data from disk when performing the HTTP request).
As far as I can understand see the FetchService requires the body to be
Into<Format<DATA>>
which would prevent any sort of streamed / chunked HTTP request?I realise for small files I can just read the file into memory using the
ReaderService
but then I am not sure how / what library I can use to create a multipart form containing this, that I can add to aFetchService::fetch
?The text was updated successfully, but these errors were encountered: