DownloadPrivate Resource not found

Options
HaiNguyen
HaiNguyen Member Posts: 5

Hi there

Thanks for reaching out.

Im trying to create an Url for my private image on cloudinary, everything is fine, but when i use that url, i get the respone "resource not found".

Here is my code (C#):

the publicId i get from the result after upload image

after run the code, i get my image url like this:

https://api.cloudinary.com/v1_1/dk0itvnep/image/download?api_key={my-api-key}&attachment=true&expires_at=1699971262&format=png&public_id=SQL_peiz1q&signature={my-signature}&timestamp=1699967663&type=authenticated

and i paste it to browser, but it reponses "resource not found"

Please help!

Best Answer

  • Vdeub
    Vdeub Member, Cloudinary Staff Posts: 53
    Answer ✓
    Options

    Hi @HaiNguyen,

    This doesn't really make sense here to use access_control . You will need to upgrade to the Advanced Plan to use the token-based authentication feature.

    You should upload your assets as authenticated without access_control and sign them so only signed URLs will be accessible.

    Regards,

    Loic

Answers

  • Vdeub
    Vdeub Member, Cloudinary Staff Posts: 53
    Options

    Hi @HaiNguyen,

    It seems your asset is not authenticated but of type upload .

    You didn't upload the asset with the type set to authenticated or private but used the access control feature documented here. You will actually need to change the type of the asset to the one you want as documented here and remove the access_control restriction to be able to use the private_download_url method.

    Hope that helps.

    Best,

    Loic

  • HaiNguyen
    HaiNguyen Member Posts: 5
    edited November 2023
    Options

    Thank you

    At the moment, i want to upload image/video, and set the access_control to restrict to protect them, and i want to share my image/video only for my customer. How do i do that?

  • HaiNguyen
    HaiNguyen Member Posts: 5
    Options

    @Vdeub Thank you very much