Comments

3 comments

  • Avatar
    Francis Tagbo

    Hi there,

    The public ID contains the full path of the uploaded asset, including the folder name and excluding the file extension. Note that if using an SDK to generate the URL, `v1` is automatically added to the URL by default for foldered images, but this is part of URL versioning and not part of the public id. In your case, your public id is `media/videos/english-preposition/Physics_is_Life_og46jg`.

    Regards,

    Francis

    0
    Comment actions Permalink
  • Avatar
    Quantum

    I tried this as well but it didn;t worked. I am using Python SDK.

    Its is giving me this error:

    Error 404 - Resource not found - media/videos/english-preposition/Physics_is_Life_og46jg

    while doing this:

    cloudinary.api.resource(
    'media/videos/english-preposition/Physics_is_Life_og46jg', video_duration=True)
    0
    Comment actions Permalink
  • Avatar
    Aleksandar Kostadinov

    Hi,

    The URL to the video would be - https://res.cloudinary.com/due5usvkm/video/upload/v1/media/videos/english-preposition/Physics_is_Life_og46jg.mp4

    In regards to retrieving it via the API - based on the code you shared, I see that you're using the get details of a single resource method. By default, methods have default values for various parameters, including 'resource_type' and 'type'. The default value for resource_type is "image" and since you are trying to retrieve a video, you need to explicitly pass the resource_type parameter set to "video" in your method call.

    Could you please try with the following code:

    cloudinary.api.resource('media/videos/english-preposition/Physics_is_Life_og46jg', resource_type = 'video', image_metadata = True)
    0
    Comment actions Permalink

Please sign in to leave a comment.