Comments (12)
- Are you able to upload files directly from the http://your.hostname/laravel-filemanager interface?
- Would you please provide your ckeditor configurations?
from laravel-filemanager.
Make sure you have installed imagick on your server.
from laravel-filemanager.
Thank you @gissly
Yes that might be the problem too.
laravel-filemanager depends on https://github.com/Intervention/image and required gd or imagick extension.
I opened a new issue for this enhancement #35
from laravel-filemanager.
My ckeditor setup looks like this:
$('.ckeditor').ckeditor({ filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images', filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token={{csrf_token()}}', filebrowserBrowseUrl: '/laravel-filemanager?type=Files', filebrowserUploadUrl: '/laravel-filemanager/upload?type=Files&_token={{csrf_token()}}' });
But when I go to the link tab and click on the Browse Server button the link looks like this:
It still puts type=Images in the link.
Do you have some suggestion?
Thanks in advance.
from laravel-filemanager.
@nadj Fixed in c9f8c62. An alpha release https://github.com/UniSharp/laravel-filemanager/releases/tag/1.3.0-alpha is now under testing. Would you please give it a try?
from laravel-filemanager.
@youchenlee thanks, now file upload doesn't hang but I receive an error
Unexpected MimeType: application/CDFV2-unknown
That's fine but I want to upload a file from the link tab Browse Server button. The link that opens is:
But in the config i have this:
$('.ckeditor').ckeditor({ filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images', filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token={{csrf_token()}}', filebrowserBrowseUrl: '/laravel-filemanager?type=Files', filebrowserUploadUrl: '/laravel-filemanager/upload?type=Files&_token={{csrf_token()}}' });
Can you tell me what am I doing wrong here?
The image upload is ok, just the type variable is wrong I think
from laravel-filemanager.
Hi @nadj
The release contains two new configs. if you upgrade the package without running php artisan vendor:publish --force --tag=lfm_config
(note: the --force argument is important), you won't see these two configs in config/lfm.php
In your case, please add application/CDFV2-unknown
into the valid_file_mimetypes
array.
I will add this to FAQ section in README.
// valid image mimetypes
'valid_image_mimetypes' => [
'image/jpeg',
'image/pjpeg',
'image/png',
'image/gif'
],
// valid file mimetypes (only when '/laravel-filemanager?type=Files')
'valid_file_mimetypes' => [
'image/jpeg',
'image/pjpeg',
'image/png',
'image/gif',
'application/pdf',
'text/plain'
],
from laravel-filemanager.
Thank you @youchenlee
I have that in my lfm.php config.
But my problem is when I go like this:
I receive a file manager window with a link:
But when I go to this link (http://homestead.app/laravel-filemanager?type=Files) in a new window, the upload works fine after adding application/CDFV2-unknown to valid_file_mimetypes.
from laravel-filemanager.
@nadj
There are two main entries to upload files with CKEditor.
If you click on the image button, it will append a type=Image
url parameter while opening filemanager window.
You might try either of the solutions:
- use the "File (link) button" instead, add your mimetype to
valid_file_mimetypes
- keep using the image button, but add your mimetype to
valid_image_mimetypes
. (this is kind of weird but it should work)
from laravel-filemanager.
Correction: The second solution won't work because once filemanager expects an image, it will try to create a thumbnail from the image. That causes an error.
https://github.com/UniSharp/laravel-filemanager/blob/master/src/controllers/UploadController.php#L51
from laravel-filemanager.
Thanks a lot, that solves all of my problems 👍
from laravel-filemanager.
@nadj You're welcome!
from laravel-filemanager.
Related Issues (20)
- Undefined method Error HOT 7
- Missing parent::error method at LfmController HOT 3
- + icon dissappears and doesn't come back HOT 3
- Larave File Manager version 2.6.4 does not support .gif files HOT 3
- clicking the confirm button to get the file path url
- Class \"Intervention\\Image\\Facades\\Image\" not found HOT 5
- Use Laravel's built in filesystem abstraction
- Not compatible with Laravel 11 HOT 2
- "Class \"Intervention\\Image\\Facades\\Image\" not found" on Laravel 11 and laravel-filemanager 2.8 HOT 6
- Can't upload a .gltf file?
- Logs left in code HOT 2
- Class "Intervention\Image\Laravel\Facades\Image" not found HOT 3
- tinymce 7 Integration
- How to use UniSharp File Manager with InertiaJS, ReactJs HOT 3
- Get relative path without the domain HOT 4
- support for Quill Rich Text Editor
- Support for Trix Editor
- Delete button is not clickable HOT 1
- Update Hebrew translations
- On file (image) upload: " Some error occured during uploading" error tooltip shows up with Tinymce 7 editor. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-filemanager.