flysystem-cloudinary icon indicating copy to clipboard operation
flysystem-cloudinary copied to clipboard

No way to set resource_type to Cloudinary\Uploader::upload

Open timkelty opened this issue 7 years ago • 3 comments
trafficstars

This seems to only work for images, as there is no way to set resource_type.

Seemingly, resource_type can be "auto", which might be sensible default so one could upload all types.

timkelty avatar Nov 30 '17 19:11 timkelty

The same is true for really most of the other api calls: upload, rename, delete_resources, maybe others.

They seem to all require the parameter explicitly (if anything but image). upload is the only one that allows you set 'auto'

timkelty avatar Nov 30 '17 20:11 timkelty

@timkelty Thanks for contributing this. I was not aware of this, since the only thing I used cloudinary for was image management.

It looks like I need to think how to implement it better. There is quite impressive problem in Cloudinary API: I cannot just listContents the folder for all resource type at once: I will need at least three http requests to get folder content if I will handle all the resource types, which is not that good from performance point of view.

enl avatar Dec 04 '17 09:12 enl

Yeah, resource_type being required is a bit annoying.

For listing a folders contents, have you looked at the Search API vs the Admin API? https://cloudinary.com/documentation/search_api

I wonder if that would allow you to list all in one call.

timkelty avatar Dec 04 '17 12:12 timkelty