Git Product home page Git Product logo

Comments (12)

youchenlee avatar youchenlee commented on July 28, 2024

@nadj

  1. Are you able to upload files directly from the http://your.hostname/laravel-filemanager interface?
  2. Would you please provide your ckeditor configurations?

from laravel-filemanager.

gissly avatar gissly commented on July 28, 2024

Make sure you have installed imagick on your server.

from laravel-filemanager.

youchenlee avatar youchenlee commented on July 28, 2024

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.

nadj avatar nadj commented on July 28, 2024

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:

http://homestead.app/laravel-filemanager?type=Images&CKEditor=sr%5Bdescription%5D&CKEditorFuncNum=0&langCode=en

It still puts type=Images in the link.
Do you have some suggestion?

Thanks in advance.

from laravel-filemanager.

youchenlee avatar youchenlee commented on July 28, 2024

@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.

nadj avatar nadj commented on July 28, 2024

@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:

http://homestead.app/laravel-filemanager?type=Images&CKEditor=sr%5Bdescription%5D&CKEditorFuncNum=0&langCode=en

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.

youchenlee avatar youchenlee commented on July 28, 2024

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.

nadj avatar nadj commented on July 28, 2024

Thank you @youchenlee
I have that in my lfm.php config.
But my problem is when I go like this:
screenshot-homestead app 2016-03-08 12-14-27

I receive a file manager window with a link:

http://homestead.app/laravel-filemanager?type=Images&CKEditor=sr%5Bdescription%5D&CKEditorFuncNum=0&langCode=en

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.

youchenlee avatar youchenlee commented on July 28, 2024

@nadj
There are two main entries to upload files with CKEditor.
screen_shot_2016-03-08_at_20_26_31

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:

  1. use the "File (link) button" instead, add your mimetype to valid_file_mimetypes
  2. 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.

youchenlee avatar youchenlee commented on July 28, 2024

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.

nadj avatar nadj commented on July 28, 2024

Thanks a lot, that solves all of my problems 👍

from laravel-filemanager.

youchenlee avatar youchenlee commented on July 28, 2024

@nadj You're welcome!

from laravel-filemanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.