Upload video as blocking method

Comments

5 comments

  • Avatar
    Michal Kuperman

    Hi John,

    In order to upload synchronously you can use this upload method:

    MediaManager.get().getCloudinary().uploader().upload()

    This method gets the same parameters as in the Java SDK and returns a map in response as documented here:

    https://cloudinary.com/documentation/java_image_and_video_upload#java_video_upload

    Let us know if this works for you and if you need any further assistance,

    Thanks,

    Michal

    0
    Comment actions Permalink
  • Avatar
    John

    Hello 

    Thank you. so with this method I can use "preset" and ensure the video is uploaded and ready for consumption before it returns? Ie. will this method handle the exact thing that the above used method does?

     

    Thanks 

     

     

    PS: I am using the Android SDK, are you saying I should use the Java SDK instead?

    0
    Comment actions Permalink
  • Avatar
    Michal Kuperman

    Hi John,

    Yes, you can use an upload preset with this method. When the video finishes uploading you would receive a response. Please note, that if you are using any asynchronous transformations in your preset (such as eager transformations), these will be performed in the background and you can set up a webhook on a server-side to be notified when these derived videos are ready. 

    You can continue using the Android SDK with this method. 

    Let us know if you need any further assistance. 

    0
    Comment actions Permalink
  • Avatar
    John

    Oh so this method is then different than the one I have in question. Because the one in question, as I was informed and the way I am calling, actually waits for all the transformations to be done. I need to ensure video availability before I go on to my next steps and this I was asking about blocking method

    0
    Comment actions Permalink
  • Avatar
    Michal Kuperman

    Hi John,

    If you are performing eager transformations with `eager_async` set to `true` or performing `incoming transformations` with `async` set to `true`, then the transformations would be performed asynchronously and the response won't include these transformations that are performed in the background (in both codes, Android and Java). 

    With that said,  if you are performing transformations synchronously, you would receive the response after the transformations are completed. Please note, that in this case, it would take longer to receive the response, depending on the video size and the transformations you are performing. 

    Please let us know if you have any further questions.

    0
    Comment actions Permalink

Please sign in to leave a comment.