muxinc / upchunk

Uploads Chunks! Takes big files, splits them up, then uploads each one with care (and PUT requests).
MIT License
336 stars 46 forks source link

How do we get asset_id of video which is uploaded #64

Closed RizwanAslam closed 3 years ago

RizwanAslam commented 3 years ago

On success callback, there is nothing passed to that method instead of the error object. I am confused about how we will get the URL of the uploaded asset which I will use to preview the video.

// subscribe to events upload.on('success', err => { console.log("Wrap it up, we're done here. 👋"); });

dylanjha commented 3 years ago

Hi @RizwanAslam thanks for reaching out. Good question -- let me help clarify. The short answer is that after the upload success fires you will need to do one of two things:

^ Either of those methods is a valid approach.


It sounds like you understand this bit -- but to clarify the relationship between Mux Uploads and Mux Assets for anyone else that may come across this:

Mux Upload

Mux Asset

Hopefully that clarifies the relationship between Uploads and Assets. Here's a guide that might be helpful too.

Let us know if you're still stuck and we'd be happy to help!

RizwanAslam commented 3 years ago

Hi @dylanjha, yup I got it now. Thank you very much for your quick response. Cheers