Conversation
|
Hi. Thanks very much for your contribution. I will try and pull this into a couple of projects when I get a chance to test it out but all looks good as far as I can tell without trying it. |
|
Any chance this can get merged soon? |
|
|
||
| $options = ['public_id' => $path, 'resource_type' => 'auto']; | ||
|
|
||
| if ($folder != '.') { |
There was a problem hiding this comment.
Does pathinfo always return a . for dirname if the file is in the cwd?
There was a problem hiding this comment.
Looking at https://www.php.net/manual/en/function.dirname.php this could be a . / or \?
There was a problem hiding this comment.
When I was running it on mac (or Heroku) it was .. I don't have access to Windows machine to check what happens there
|
Have not yet had a chance to fully test this. Can anyone confirm if this works with nested folders? IIRC there are some limitations on Cloudinary but there is no validation going on here. Does Cloudinary throw an error and we don't need to worry about additional validation or will things just not work as expected. Happy to merge if someone can clarify some of these edge cases. |
|
We're currently using this approach and it does work for nested folders; indeed there's no validation, but I don't think it's required as all it's doing is passing additional parameters straight into Cloudinary PHP package, but I do admit that I've not tested what will happen if I'll try to upload file into |
|
Hi, any update about this PR ? I would be interested by this feature :) |
|
Try to check out #16 for an implementation of not only folders but all the optional parameters. |
Per #4
This will allow users to define what folder on Cloudinary given field should upload to. While default folder where the file is stored is set to be '/' in
Laravel\Nova\Fields\File($storagePath), one can override this behaviour by extendingCloudinaryImageand defining$storagePathwithin the constructor.