Get resource type in js

Comments

1 comment

  • Avatar
    Daniel Mendoza

    Hi,

    We highly recommend to save the public id, resource type and type, and original format that is returned back from the upload widget. Those three values should be enough to generate the Cloudinary URL. I would highly recommend adding those to your database and you would need to use the Admin API to query all your assets (https://cloudinary.com/documentation/admin_api#get_resources) and save the additional fields. 

    If nothing special was done to those files when you uploaded them, then most likely they will be:
    - Images - by default are resource type image, type upload
    - Videos - by default, are resource type video, type upload
    - PDF - by default, are resource type image, type upload

    Hope this helps.

    0
    Comment actions Permalink

Please sign in to leave a comment.