Async Uploads

Options
tobydigz
tobydigz Member Posts: 1
edited February 2023 in Developer APIs

Hi, I'm using the async option while uploading a file. And I get the batch_id back. How do I use the batch_id to track the upload progress?

Tagged:

Answers

  • Ranson
    Ranson Cloudinary Staff Posts: 19
    Options

    Hey tobydigz,

    This would be done via the notification webhooks we provide.


    Our blog post here: https://cloudinary.com/blog/webhooks_upload_notifications_and_background_image_processing contains a guide on setting up a notification endpoint to be alerted when an upload has finished.

    Please let us know if further clarification is needed on this!

  • Harsh
    Harsh Member Posts: 3
    Options

    Hello @Ranson

    I'm encountering an issue with eager transformation. When I uploaded a file, I received the following response: {batch_id=<GENERARED_BATCH_ID>, type=upload, status=pending}. However, my notification URL isn't being triggered, but this is only happening for a single file. I tried to perform an eager transform for the same file multiple times.

    I'm able to transform other files successfully, and their notification URLs are triggered as expected.

    Could you please advise me on how to trace the issue using the batch_id to understand why the notification URL isn't getting triggered for this particular file? Thank you for your assistance.

  • Harsh
    Harsh Member Posts: 3
    Options

     I received an error response for all the pending ones after an hour. Request R1 made at time T1 for a smaller file got processed later whereas Request R2 made at time T2 for a bigger size file was processed immediately. The important thing here is my notification URL triggered for all the transformation calls.