cloudinary-community / cloudinary-laravel

Laravel SDK for Cloudinary
MIT License
255 stars 71 forks source link

Create folders with the SDK #89

Closed hagealex closed 7 months ago

hagealex commented 1 year ago

Hello everyone,

I'm not sure if this is already possible as I didn't find anything about this in the docs. So here is my question:

Is it possible to create new folders with the SDK?

I have an application were users can upload images. I would like to have the images separated in folders. One folder for each user.

So on registration I would like to create a new folder for the new user.

Can I achieve this with the SDK or do I have to use the Cloudinary API directly?

Appreciate any help :)

unicodeveloper commented 1 year ago

You can achieve this with the SDK, just specify the name of the folder together with the name of the image during upload.

E.g if you want the folder to be 'avatars', you can just do avatars/name_of_image