mostafaznv / nova-ckeditor

CkEditor 5 Field for Laravel Nova with Media & Snippet Browsers
https://mostafaznv.gitbook.io/nova-ckeditor/
MIT License
49 stars 20 forks source link

Image / Video drag-and-drop doesn't seem to work #99

Closed umaraziz0 closed 9 months ago

umaraziz0 commented 9 months ago

I was trying to upload an image just by dragging one from my file explorer into the CkEditor, but was unable to and saw this response in the console:

image

I have already specified the disk on the App\Nova\Resources\Image.php file, as well as on on the config/filesystems.php as written in the installation instructions:

// App\Nova\Resources\Image.php

ImageUpload::make(trans('File'), 'image', 'image')
    ->rules('required', 'mimes:jpg,jpeg,png,gif', 'max:5000')
    ->help(trans(':size Megabyte Max FileSize.', ['size' => 5])),
// config/filesystems.php

'disks' => [
    'image' => [
        'driver'     => 'local',
        'root'       => public_path('uploads/image'),
        'url'        => env('APP_URL') . '/uploads/image',
    ]
]

However, when I tried using the Image Picker, the file was able to upload without any problems. Is there a way to upload just by drag-and-drop to the CkEditor instead?

My specs:

mostafaznv commented 9 months ago

Hi @umaraziz0,

Currently, the feature to drag-and-drop files directly into NovaCkEditor is not available. Media can only be uploaded using the media-picker. However, I recognize the potential value of adding a drag-and-drop feature, and I appreciate your suggestion. I've noted this issue, and I plan to investigate the feasibility of implementing it in future versions. The issue will remain open, and I'll keep you updated on any developments.

Thank you for your feedback.

mostafaznv commented 9 months ago

Hi.

The requested feature has been added to the package. Please update to 6.2.0.

Please note that dragging/pasting is currently only available for images, not videos or audios. Reference: link