Closed hamidroohani closed 3 months ago
Looking into this issue now
@hamidroohani
When you define a folder in filesystem.php the file will upload to this dir correctly. But if you want to call the exists method on Storage you must add the folder in hard code for this method
Just fixed this in #62
And the second problem is when you want to call the url method on Storage, you must delete the folder and put double file extension.
Please refer to the following section of the documentation: https://github.com/codebar-ag/laravel-flysystem-cloudinary?tab=readme-ov-file#-file-extension-problem
This is intended as you pass the extension as part of the file name, 01J493QRS7S4AWYB3V522JN48B.jpg
would be the public_id in cloudinary. To remove this please see the documentation linked above.
The second .jpg
is the file type you wish to return, you can change the second extension to .webp
for example.
https://cloudinary.com/documentation/image_transformations#delivering_in_a_different_format
Please see the following for an in-detail explanation: https://github.com/codebar-ag/laravel-flysystem-cloudinary/issues/56#issuecomment-2025046863
What happened?
When you define a folder in
filesystem.php
the file will upload to this dir correctly. But if you want to call theexists
method onStorage
you must add the folder in hard code for this method And the second problem is when you want to call theurl
method onStorage
, you must delete the folder and put dubble file extension.\Illuminate\Support\Facades\Storage::disk('cloudinary')->exists("mc/01J493QRS7S4AWYB3V522JN48B.jpg");
\Illuminate\Support\Facades\Storage::disk('cloudinary')->url("01J493QRS7S4AWYB3V522JN48B.jpg.jpg");
Package Version
4.2
PHP Version
8.3
Laravel Version
11.0.0
Which operating systems does with happen with?
macOS, Linux