vimeo_me2 icon indicating copy to clipboard operation
vimeo_me2 copied to clipboard

Upload progress

Open Paulosmelo opened this issue 3 years ago • 3 comments

I am using vimeo_me2 gem in my work project and I need to make a progress bar so that I can get my client feedback of the uploaded video. So I thought about contributing to creating a function to check this progress. Maybe isn't really a clean code because I'm still a junior software engineer but I hope with some help we can do it!

Paulosmelo avatar Jun 16 '21 21:06 Paulosmelo

Hi,

I don't think this will work as you think it would. When using the upload function, the code is blocked until the upload has completed (or failed). Or do you have a different idea? I think the only option is to create a separate API request to get the status of the upload, but for that you also need to pass the ID of the video that's being uploaded (I guess, as I've never tried this)

Cheers

bo-oz avatar Jun 17 '21 15:06 bo-oz

Yes, after looking up the code I realized that is using a patch to upload the file until it is done. I also tried to create a different API request using a VimeoObject.patch but I got a Broken pipe (Errno::EPIPE).

Thanks

Paulosmelo avatar Jun 17 '21 15:06 Paulosmelo

Other option might be to use a JS way of uploading the file directly from the client. That way you can easily do a progress bar.

bo-oz avatar Jun 17 '21 16:06 bo-oz