Closed valboivin closed 8 months ago
Hi Valerie,
Currently, the plugin exclusively handles image files. I've been actively working on expanding its compatibility to encompass all file types, but that's still in progress. The Cloudinary API poses challenges in how it distinguishes between images, videos, and other assets, making the task of ensuring seamless operation across all file types quite intricate. While extending support to all file types comes with drawbacks such as a noticeable rise in rate-limited API calls, I believe the benefits outweigh the challenges. I aim to complete the implementation within the next two weeks, although I can't make a definitive promise at this time.
The issue has been addressed and incorporated into version 1.6.0, which is now available.
@thomasvantuycom thank you so much, that was quick! 😄
One last thing regarding your changes. I feel like you've forgotten to parse the variable in the creation of the Cloudinary Adapter
instance.
The asset uploaded on the Cloudinary account doesn't have the right url:
On the CloudinaryFS file, I think it should be like this:
return new CloudinaryAdapter($client, App::parseEnv($this->baseFolder), null, $this->dynamicFolders);
Well darn, I've made the same mistake for the nth time.
Happens to the best of us! 😄
Hi there!
Seems like some file formats are not supported via uploads in the plugin. For instance, I can easily upload a JSON file directly in our Cloudinary account, but not via our Craft CMS admin panel. I get an "Invalid image file" error.
To fix it on my part, I've added
'resource_type' => 'auto'
to the$uploadOptions
object of thewriteFileFromStream
function. (I could probably also add this parameter to thewrite
function.) With this change, I can upload my JSON file without any problem.I'm wondering if that could be a nice addition or if there's a better way to do this.
Thanks