Skip to content

Conversation

@carnevalle
Copy link

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

use Silvanite\NovaFieldCloudinary\Fields\CloudinaryImage;

public function fields(Request $request)
{
    return [
        ...
        CloudinaryImage::make('Image')->cloudinary([
            'folder' => 'images'
        ]),
    ]
}

Using optional parameters it is possible to i.e. save uploaded files to a specific folder.
Copy link

@FlavioIshii FlavioIshii left a 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.

parent::__construct($name, $attribute, $disk, $storageCallback);

$this->storeAs(function (Request $request) {
$this->store(function(Request $request, $model, $attribute, $requestAttribute){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->store(function(Request $request, $model, $attribute, $requestAttribute){
$this->store(function(Request $request, $requestAttribute) {

parent::__construct($name, $attribute, $disk, $storageCallback);

$this->storeAs(function (Request $request) {
$this->store(function(Request $request, $model, $attribute, $requestAttribute){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->store(function(Request $request, $model, $attribute, $requestAttribute){
$this->store(function(Request $request, $requestAttribute) {

parent::__construct($name, $attribute, $disk, $storageCallback);

$this->thumbnail(function () {
$this->store(function(Request $request, $model, $attribute, $requestAttribute){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->store(function(Request $request, $model, $attribute, $requestAttribute){
$this->store(function(Request $request, $requestAttribute) {

parent::__construct($name, $attribute, $disk, $storageCallback);

$this->storeAs(function (Request $request) {
$this->store(function(Request $request, $model, $attribute, $requestAttribute){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->store(function(Request $request, $model, $attribute, $requestAttribute){
$this->store(function(Request $request, $requestAttribute) {

@lukebouch
Copy link
Collaborator

@carnevalle @FlavioIshii This looks really interesting. I will take a look at this and see if we can get this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants