-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it possible to use optional parameters (i.e. support of folders) #16
base: master
Are you sure you want to change the base?
Conversation
Using optional parameters it is possible to i.e. save uploaded files to a specific folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there plans to review and merge this PR? Would be nice to have support for folders.
@@ -20,14 +23,27 @@ public function __construct($name, $attribute = null, $disk = 'cloudinary', $sto | |||
{ | |||
parent::__construct($name, $attribute, $disk, $storageCallback); | |||
|
|||
$this->storeAs(function (Request $request) { | |||
$this->store(function(Request $request, $model, $attribute, $requestAttribute){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->store(function(Request $request, $model, $attribute, $requestAttribute){ | |
$this->store(function(Request $request, $requestAttribute) { |
@@ -21,14 +21,27 @@ public function __construct($name, $attribute = null, $disk = 'cloudinary', $sto | |||
{ | |||
parent::__construct($name, $attribute, $disk, $storageCallback); | |||
|
|||
$this->storeAs(function (Request $request) { | |||
$this->store(function(Request $request, $model, $attribute, $requestAttribute){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->store(function(Request $request, $model, $attribute, $requestAttribute){ | |
$this->store(function(Request $request, $requestAttribute) { |
@@ -21,7 +23,20 @@ public function __construct($name, $attribute = null, $disk = 'cloudinary', $sto | |||
{ | |||
parent::__construct($name, $attribute, $disk, $storageCallback); | |||
|
|||
$this->thumbnail(function () { | |||
$this->store(function(Request $request, $model, $attribute, $requestAttribute){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->store(function(Request $request, $model, $attribute, $requestAttribute){ | |
$this->store(function(Request $request, $requestAttribute) { |
@@ -20,14 +20,27 @@ public function __construct($name, $attribute = null, $disk = 'cloudinary', $sto | |||
{ | |||
parent::__construct($name, $attribute, $disk, $storageCallback); | |||
|
|||
$this->storeAs(function (Request $request) { | |||
$this->store(function(Request $request, $model, $attribute, $requestAttribute){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->store(function(Request $request, $model, $attribute, $requestAttribute){ | |
$this->store(function(Request $request, $requestAttribute) { |
Fix download URL of images using folders
Fix missing dirname on delete
@carnevalle @FlavioIshii This looks really interesting. I will take a look at this and see if we can get this merged. |
I have added support for using the optional parameters in the Cloudinary Upload API. The parameters are configurable when creating the field using the
cloudinary
method, like this