You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uploading files on a client side application is often used. It would be nice to have a helper that provides details on the upload to show progress and state.
The function should accept:
url
method (POST/PUT/...).
The signals it could return are:
State (waiting, uploading(x bytes, total bytes), done)
Trigger/Start the upload, you may want to queue the upload
Cancel/abort the upload
Optional callback with the state where you want to manage some other state when the state changes
The text was updated successfully, but these errors were encountered:
After doing a bit of research I think this function could take an arbitrary FormData as input to upload. That way a user could easily upload one or multiple files together with extra data, or even just data without files.
The FormData could be a wrapper around web_sys::FormData to allow for better UX with rust types like byte arrays etc.
Uploading files on a client side application is often used. It would be nice to have a helper that provides details on the upload to show progress and state.
The function should accept:
url
method
(POST/PUT/...).The signals it could return are:
State
(waiting, uploading(x bytes, total bytes), done)Trigger
/Start
the upload, you may want to queue the uploadCancel
/abort
the uploadcallback
with the state where you want to manage some other state when the state changesThe text was updated successfully, but these errors were encountered: