Is there a upload progress for useSubmit? #2210
-
Hi, I'm currently working on a component that allows the user to upload files. I want to show the user the progress of the upload and with The Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Unfortunately that is not supported at the moment (as of Remix v1.2.3... in case it's added later). |
Beta Was this translation helpful? Give feedback.
-
I'm currently working on a Remix-project that needs this as well. Since we're dealing with huge files (>4 GB) and because there've been issues with resumability historically, we chose to use tus with Uppy and forego Remix uploads entirely. Another possibility would be to use a XMLHttpRequest yourself, which implements a progress event as opposed to I've had a brief exchange with Ryan on twitter where he hypothesized that in a future release, Remix might switch to XHR and hand you a |
Beta Was this translation helpful? Give feedback.
-
I am using something like this too. I think it's not possible because most of the browsers don't give you this info. Also, you are probably uploading more than one file. So, my solution is to use Axios for file uploads (which has onUploadProgress callback). get the random id for the file from backend. and set the id in the form to post with the rest of the data. this way I can see the progress or errors of the files individually. and I think it's a much better user experience. |
Beta Was this translation helpful? Give feedback.
-
Here's a snippet I used in my code, maybe some of you will find it useful. `async function onVideoSubmit(event: FormEvent) {
}` |
Beta Was this translation helpful? Give feedback.
-
I was faced with the same use case where I had to visualize the upload progress in order to improve the UX for large file uploads. My solution extends Remix's Maybe it is useful for somebody. I summarized this strategy in the blog post: Progressively Enhanced File Uploads with Remix |
Beta Was this translation helpful? Give feedback.
I'm currently working on a Remix-project that needs this as well. Since we're dealing with huge files (>4 GB) and because there've been issues with resumability historically, we chose to use tus with Uppy and forego Remix uploads entirely.
Another possibility would be to use a XMLHttpRequest yourself, which implements a progress event as opposed to
fetch
, which does not.I've had a brief exchange with Ryan on twitter where he hypothesized that in a future release, Remix might switch to XHR and hand you a
progress
automatically when it detects a file upload.