How do I use "auto" type for Auto Upload?
I have set up an Auto Upload folder. I want to use it to serve both images and videos. I can't make the decision to use "image" or "video" in the path. I just want to use an "auto" parameter, and have you detect what it is based on the resources content type or extension.
So I want to use it like this:
http://res.cloudinary.com/shiftlabny-com/auto/upload/q_auto/some-video.mp4
http://res.cloudinary.com/shiftlabny-com/auto/upload/q_auto/some-image.png
However, "auto" doesn't seem work on auto uploads, though I have seen it in other endpoints, like here:
https://support.cloudinary.com/hc/en-us/community/posts/200788472-resource-type-auto-not-required-
-
Hi, Jason.
As mentioned in my last comment (and apologies if it wasn't clear enough), Cloudianry currently doesn't support such arbitrary URL. You will have to distinguish between the 2 types before making the request to Cloudinary.
That said, I've forwarded your inquiry to our product team, so we might be supporting such ability in the future.
-
Hi Charlie,
I think I answered this in a previous support ticket with you but wanted to make sure you had all your outstanding questions answered.
Given that you set up the auto-mapping correctly, to specify the resource type when retrieving a video auto mapping just use the 'video' in the URL instead of 'image'. For example:
https://res.cloudinary.com/<your Cloudinary account's cloud name>/video/upload/<mapped upload folder prefix>/<partial path of remote resource>Check here for the list of video formats we support:
https://cloudinary.com/documentation/video_manipulation_and_delivery#transcoding_videosFor files not images or video, you could use the raw file resource:
https://res.cloudinary.com/<your Cloudinary account's cloud name>/raw/upload/<mapped upload folder prefix>/<partial path of remote resource>Also here's more information on auto mapping/auto loading:
https://cloudinary.com/documentation/upload_images#auto_fetching_remote_images
Post is closed for comments.
Comments
5 comments