Comments (2)
Hi @dylanjha, yup I got it now. Thank you very much for your quick response. Cheers
from upchunk.
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:
- Make a request from your client to your server and from your server make a request to Mux with the
upload_id
- Wait for the Mux Webhook
video.upload.asset_created
(more details here) -- this will contain the fullupload
object which will have anasset_id
property.
^ 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
- This gets created on the serverside and gives you an "upload URL" by making the request:
POST /uploads
- The upload itself has several properties:
id
,url
,status
,new_asset_settings
,error
- Use the
url
property with Upchunk to perform the upload -- it sounds like you got this far - When the upload is complete, either
GET /uploads/:id
API Reference or listen for thevideo.upload.asset_created
Webhooks - At this point in time now that the upload is complete, the upload will have an
asset_id
property.
Mux Asset
- Use the
asset_id
property from the completed upload to fetch the asset - GET
/assets/:id
: API Reference - The asset itself has a
status
("preparing"
,"ready"
,"errored"
),playback_ids
,aspect_ratio, an
upload_id`, etc. - Be ready to handle all 3 statusus in your application. When the upload is complete the asset will start in the
"preparing"
state and assuming a valid video file as been uploaded then it will transition to"ready"
. If the file was not a video file, or happens to be invalid for another reason then the asset will be in the"errored"
status.
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!
from upchunk.
Related Issues (20)
- Possibility to use content-type Form Data HOT 2
- Multiple uploads HOT 4
- Error 501 - not implemented, when trying to upload to AWS S3 bucket via pre-signed URL HOT 2
- Error on deployed Next.js website HOT 9
- I am try to resume upload, but it seems it restart again but no resume. HOT 3
- The video asset get auto deleted after 24 hours? HOT 1
- parallel upload of chunks HOT 2
- Progress event arguments bug HOT 9
- Uploading large files on mobile browsers fails HOT 1
- Retrieving Asset ID after upchunk finishes an upload? HOT 2
- [Bug] Failure to Handle 'Range' Response Header in Chunked Uploads to GCS HOT 2
- [Feature Request] Response object inside the 'error' event HOT 2
- How to pass additional data with request HOT 5
- TypeError: Cannot read properties of null (reading 'includes') HOT 1
- Upload of large files 4GB+ fails on Safari. UpChunk or WebKit problem? HOT 9
- TypeError occurred using a Japanese file name HOT 9
- Failed chunk upload callback response is undefined error HOT 1
- returning the asset ID on success HOT 1
- GCS chunked request overwrites existing file instead of appending to it HOT 2
- WebKit: in-memory FileReader failover, invalid Content-Range header. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from upchunk.