Code Monkey home page Code Monkey logo

ckfinder-laravel-package's Introduction

CKFinder 3

This repository contains a public issue tracker for CKFinder 3.

Feedback

Use the Issues link on the top to report issues in CKFinder 3 (and its documentation) or submit feature requests.

If you are unsure what information to provide when reporting a bug, check Reporting Issues.

Translations

In order to submit translations for CKFinder please use the ckfinder-translations repository.

Documentation

CKFinder is composed of two parts: the client-side part and the server-side connector(s).

The client-side part is written in JavaScript and is common across all distributions (PHP and ASP.NET), while the server-side parts are different for each language. There are thus multiple CKFinder 3 documentation websites available.

CKFinder 3 Documentation

This website contains documentation for the JavaScript, client-side part of CKFinder which is common for all versions of CKFinder 3. It includes information about:

  • Integrating CKFinder with your website or with CKEditor.
  • Client-side configuration options.
  • API documentation.
  • Tutorials about creating JavaScript plugins.
  • Tutorials about creating skins.

CKFinder 3 for PHP Documentation

This website contains documentation for the PHP connector of CKFinder 3 and includes information about:

  • Enabling the PHP connector.
  • Configuring the PHP connector.
  • Tutorials about creating PHP plugins.

CKFinder 3 for ASP.NET Documentation

This website contains documentation for the ASP.NET connector of CKFinder 3 and includes information about:

  • Enabling the ASP.NET connector.
  • Configuring the ASP.NET connector.
  • Tutorials about creating ASP.NET plugins.

CKFinder 3 for Java Documentation

This website contains documentation for the Java connector of CKFinder 3 and includes information about:

  • Enabling the Java connector.
  • Configuring the Java connector.
  • Tutorials about creating Java plugins.

License

Copyright (C) 2007-2019, CKSource - Frederico Knabben. All rights reserved.

To purchase a license for CKFinder visit the CKFinder website.

ckfinder-laravel-package's People

Contributors

annatomanek avatar bkstar123 avatar bmlotek avatar ip-developer avatar marcin-betlinski avatar serderovsh avatar vinhphamduc avatar vokiel avatar yahav avatar yukimatsuo avatar zaak avatar zacksleo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ckfinder-laravel-package's Issues

array_key_exist() Must be String or Int in ServiceProvider.php line 73

Hello guys
When i run
php artisan ckfinder:download
I face the error
array_key_exist() first parameter must be string or int in ServiceProvider.php line 173
and after that i checked In CKFinderServiceProvider.php
and changed this :

$this->publishes([
                __DIR__.'/config.php' => config_path('ckfinder.php')
            ], ['ckfinder', 'ckfinder-config']);

            $this->publishes([
                __DIR__.'/../public' => public_path('js')
            ], ['ckfinder', 'ckfinder-assets']);

            $this->publishes([
                __DIR__.'/../views/setup.blade.php' => resource_path('views/vendor/ckfinder/setup.blade.php'),
                __DIR__.'/../views/browser.blade.php' => resource_path('views/vendor/ckfinder/browser.blade.php')
            ], ['ckfinder', 'ckfinder-views']);

To :

 $this->publishes([
                __DIR__.'/config.php' => config_path('ckfinder.php')
            ],  'ckfinder-config');

            $this->publishes([
                __DIR__.'/../public' => public_path('js')
            ], 'ckfinder-assets');

            $this->publishes([
                __DIR__.'/../views/setup.blade.php' => resource_path('views/vendor/ckfinder/setup.blade.php'),
                __DIR__.'/../views/browser.blade.php' => resource_path('views/vendor/ckfinder/browser.blade.php')
            ], 'ckfinder-views');

then it's work

"Cannot upload file" message

Image is appearing temporarily, then a pop message saying "Cannot upload file" appears and when I click "ok" image dissapears.
Image file is copying into data/files and settings are writing to storage/cache/data/files

Any idea what's going on? Been trying to fix it for hours without any luck

I modified connector and added &responseType=json in the end and now I'm not getting a popup message but I'm getting ERR_CONNECTION_REFUSED in the console for the uploaded image

In the logs I'm getting the following error:
[2020-06-14T03:24:00.253143+00:00] CKFinder.WARNING: ErrorException: Since symfony/http-foundation 5.1: The "Symfony\Component\HttpFoundation\JsonResponse::create()" method is deprecated, use "new CKSource\CKFinder\Response\JsonResponse()" instead.

My uploadUrl not work

ckfinder: { uploadUrl: '../ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files&responseType=json' }

Laravel can not cache config file

When Laravel tries to cache the config file i get an error that it can not cache the ckfinder config file.
Duo the authentication callable laravel configs may not contain a callable.

Using Laravel 5.7
How to reproduce after publishing the config of this package run:

php artisan config:cache

How could we fix this?

CKFinder not working in Laravel 6.0+

Hello. Thank you very much for your attention.

Followed all the installation instructions, but with @include ('ckfinder :: setup') nothing happens on the page.

  • Cleared all caches.
  • Page in .blade.php extenstion.
  • Auth is off (config/ckfinder, $config['authentication'] = function () { return true;};

What is the problem?

Publish views for customization

Instead of publishing the assets into public/js folder using artisan command, I set up Laravel Mix to copy the assets from vendor folder to public/admin/vendor folder as needed by my assets structure.
This works nice with the file manager being used as a widget on a page, but it breaks when using it as file browser when integrated into CKEditor (because package's setup.php still points to public/js).
It is easily solved by manually copying vendor's view files to views/vendor/ckfinder and editing them there, because, as per documentation, when requiring a vendor view (in this case view('ckfinder::browser')), Laravel will search both vendor's views folder and the app's views folder (in this case views/vendor/ckfinder/browser.php). I think it would be way easier to specify in the service provider that this package has publishable views. It would go like this:

$this->publishes([
       __DIR__.'/config.php' => config_path('ckfinder.php'),
       __DIR__.'/../public' => public_path('js'),
       __DIR__.'/../views' => resource_path('views/vendor/ckfinder')
], 'ckfinder');

Also, because this package's views are not using Blade, it is not possible to customize setup.php without also customizing the browser.php file. It would be better to use blade (rename browser.php and setup.php to browser.blade.php and setup.blade.php), and replace <?php include __DIR__.'/setup.php' ?> with @include('ckfinder::setup').

Going deeper, it would be better to set different publishing tags for assets and views. In my case, I don't need the assets to be published. I just need the config and the views. It also can be easily done.

If this gets approved, I can make a pull request that will integrate everything described in this issue.

Unable to config the accessControl for user roles

I have recently installed this package and I want to hide most of features for all the user roles.

This is how my ckfinder.php accessControl looks like in the config folder

$config['accessControl'][] = array(
'role' => '',
'resourceType' => '
',
'folder' => '/',
'FOLDER_VIEW' => false,
'FOLDER_CREATE' => false,
'FOLDER_RENAME' => false,
'FOLDER_DELETE' => false,
'FILE_VIEW' => false,
'FILE_UPLOAD' => false,
'FILE_RENAME' => false,
'FILE_DELETE' => false,
'IMAGE_RESIZE' => false,
'IMAGE_RESIZE_CUSTOM' => false
);

and this is how my public/js/ckfinder/config.js looks like

-- START ---
var config = {}; // Set your configuration options below. // Examples: // config.language = 'pl'; // config.skin = 'jquery-mobile'; CKFinder.define( config );
-- END --

Issue:
When I open the CKfinder from CKeditor, still I see buttons like "Upload", "New Subfolder" and based on the above configuration on the PHP they should be hidden for all the user roles.

Could you please investigate and provide a solution for this issue?

How to override default upload functionality

Hello! Thank you for your work!

I want to override default upload functionality. What exactly I want:

  1. Custom file paths and names. For example: /storage/app/public/uploads/media-library/<users_group_id>/<random_string>.jpg.
    Ok, 'baseUrl' and 'root' I can setup in /config/ckfinder.php. But how can I add 'users_group_id' (dynamic value) and random file name?
  2. Ideally I would like to use a disk.
  3. Make record in database for each uploaded file.
  4. Read files from custom folders.

My current solution:
I've made a custom plugin for CKFinder and it works fine for me. In my plugin I am listening to event "CKFinderEvent::FILE_UPLOAD". But how I can prevent defaul upload functionality? Now my files are duplicates.

My code:

<?php

namespace CKSource\CKFinder\Plugin\UploadPlugin;

use App\Models\Account;
use App\Models\Media;
use CKSource\CKFinder\CKFinder;
use CKSource\CKFinder\Config;
use CKSource\CKFinder\Event\CKFinderEvent;
use CKSource\CKFinder\Event\FileUploadEvent;
use CKSource\CKFinder\Plugin\PluginInterface;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class UploadPlugin implements PluginInterface, EventSubscriberInterface
{
    protected $app;

    public function setContainer(CKFinder $app)
    {
        $this->app = $app;
    }

    public function getDefaultConfig()
    {
        return [];
    }

    public function customAction(FileUploadEvent $event)
    {
        /* @var $account Account */
        $account = auth()->user();
        $businessId = $account->business->getKey();

        $uploadedFile = $event->getFile();

        $fileName = $businessId . DIRECTORY_SEPARATOR . Str::random(25) . '.' . $uploadedFile->getExtension();

        Storage::disk('media-library')->put($fileName, $uploadedFile->getContents());

        $path = Storage::disk('account')->path($fileName);
        $mime = mime_content_type($path);

        return Media::create(['path' => $path, 'name' => $fileName, 'type' => $mime]);
    }

    public static function getSubscribedEvents()
    {
        return [CKFinderEvent::FILE_UPLOAD => 'customAction'];
    }
}

How management files via Mysql Database

Hello,

I am migration news site to Laravel. The images and document files are management via files table ( storing file name, path). My question How I can use ckfinder with existing files table in Mysql?

Best regards,
Bang.

InvalidCsrfTokenException

When trying to upload files/create directories i'm getting Invalid request error. upon debug i see that the following comment is thrown: InvalidCsrfTokenException.
I've disabled Laravel's Csrf protection for the following urls:
'ckfinder/*',

So this is ckfinder's csrf protection fault.
The request itself does seem to have the following post data
ckCsrfToken: 5SOFU7Hrnpbzwy7LT32qFp998sqFQagkAwZsA08d
the request also seem to have cookie with the same name and the same value..

Any idea's how to deal with this without disabling ckfinder's csrf protection entirely?

Laravel 5.7 integration

I'm trying to add CKfinder to a website with the CKfinder package for Laravel.
The attempt to insert an image ends with an alert and fails.

  1. Installation (Laravel 5.7, updated)
  • inclusion of CKeditor 5 (inline) build without option
  • installation of CKfinder as specified by the site
    https://github.com/ckfinder/ckfinder-laravel-package
    • basic implementation (authentication returns true)
    • inclusion of @include('ckfinder::setup') in the blade template
  • ajout de ckfinder à la création de l'instance InlineEditor :
            ckfinder: {
                uploadUrl: baseurl +'/ckfinder/connector?command=QuickUpload&type=Images',
                options: {
                    resourceType: 'Images'
                }
            },

  1. Behaviour :
    CORRECT :
  • the page is opened without error
  • CKeditor is open, works normally and saves its text
  • Image button calls the file selector
  • the selected image is displayed in CKEditor div
    <div class="ck5editable"">
        <img src="data:image/jpeg;base64,/9j/4SY7RXhpZgAAT [...] AAAAAAAAAAAAA=">
        <figcaption class="ck-editor__editable ck-editor__nested-editable ck-placeholder" data-placeholder="Saisir la légende de l’image" contenteditable="true">
            <br data-cke-filler="true">
        </figcaption>
        <div class="ck-progress-bar" style="width:100%;"></div>
        </figure>
        <div style="position: fixed; top: 0px; left: -9999px; width: 42px;">Objet image</div>
    </div>

  • the selected image is correctly transmitted to the server (screenshot 3, apache log)
  • the image is saved in the intended location (screenshot 2, file tree)

BUT THEN:

  • an alert is displayed: "Sending failed file: ."
  • after[OK], the image disappears from the editor and its html code
  • the console indicates two resources from XHR:
    • "blob": the image (screenshot safari-console-blob)
    • "connector": a script (screenshot safari-console-connector) :
        <script type="text/javascript">
            window.parent.CKEDITOR.tools.callFunction("", "http:\/\/127.0.0.1\/siteh57\/public\/userfiles\/images\/<filename>", "");
        </script>

I only see one weird thing: in this last script, the call to the function starts with an empty parameter.
Is there another mistake?

screenshots.zip

Error Route default

Good morning, I have the following error .. When loading the ckfinder ..
The way I solved it was creating the route
Route::any('/AppBase/public/js/ckfinder/core/connector/php/connector.php', 'CKSource\CKFinderBridge\Controller\CKFinderController@requestAction') ->name('ckfinder_connector_base');

But I want to use the default route that is
Route::any('/ckfinder/connector', 'CKSource\CKFinderBridge\Controller\CKFinderController@requestAction') ->name('ckfinder_connector');

Any idea why that Error.

league/flysystem dependency conflict

Trying to install ckfinder-laravel-package on one of my projects threw up a conflict with the latest league/flysystem version already installed.

I've created a PR that tweaks the league/flysystem composer dependencies.

It seems to be working on my local environment but I've not extensively tested it.

Change default upload folder from 'files'

In previous version of CKFinder we had it set up so that if a user clicked on the image icon and uploaded a file it would default to the 'images' folder, where as if a link was created and file uploaded this would appear in the 'files' folder.

Is this possible? At the moment everything seems to be added to 'files' by default, even when commenting out the files resourceType config (which then breaks the upload completely)

Images overwriteOnUpload not working if copy and paste from word document

Hi,

Image overwirteOnUpload config is not working if there is multiple images inside Microsoft word file. I think it is because all the images copy form word are named as "image". While uploading multiple images at the same time, some images are overwritten.

I already tried with both local connector storage and aws s3 connector but both are not working.

Please kindly suggest me about it. Thanks

Route [ckfinder_connector] not defined.

When I cached the route via php artisan route:cache, puted @include('ckfinder::setup') in the page then access the page. I got error called Route [ckfinder_connector] not defined. . How to fix that?

I use laravel 7 error message cannot read directory

I use laravel 7 when install success package ckfinder. I think it just happens version laravel 7. PLZ help me fix
Url: http://localhost:8081/ckfinder/connector?command=Init&lang=en&type=Images
Error:

TypeError
Argument 1 passed to CKSource\CKFinder\CKFinder::handleOptionsRequest() must be an instance of Symfony\Component\HttpKernel\Event\GetResponseEvent, instance of Symfony\Component\HttpKernel\Event\RequestEvent given, called in /var/www/html/blog/vendor/symfony/event-dispatcher/EventDispatcher.php on line 230,```

I can't watch image preview

Screen Shot 2020-04-06 at 11 54 06 PM

link: myweb.abc/ckfinder/connector?ommand=ImagePreview&lang=vi&type=files&currentFolder=%2F&hash=da5f9c9912bb8918&fileName=pngguru_com%20(35).png&size=1584x507&date=20200406234253

Log:
Screen Shot 2020-04-07 at 12 01 03 AM
//===============

I use:
Laravel Framework 6.18.1
PHP 7.2.22
Ckfinder 3
I can't watch image preview, I spent hours and hours, but I could find the solution. Can you help me?
Thank you!

The file browser is disabled for security reasons

I tried installing ckfinder in my Laravel 5.8, but I get this error when I open the modal

The file browser is disabled for security reasons. Please contact your system administrator and check the CKFinder configuration file.

What can the error be?

I created the middleware:
$config['authentication'] = '\App\Http\Middleware\CKFinderAuth';

     {
         config(['ckfinder.authentication' => function() {
             return true;
         }]);
         return $next($request);
     }

should I declare it also in the kernel.php?

How to config global language?

In ckfinder.php, I have try:
$config['language'] = 'vi';
But it not work.

It just work when I config:

CKFinder.config( { 
connectorPath: <?php echo json_encode(route('ckfinder_connector')) ?> 
language: 'vi'
} );

So, how to i can config default language in global?

404 Error when opening from CKEditor

Hi, Can access CKFinder through /ckfinder/browser and can upload files successfully to /public/userfiles directory. But when I click CKFinder icon from CKEditor popup loads with a Laravel 404 error page. Any help much appreciated

Screenshot 2020-04-13 at 00 28 28

Couldn't load CKFinder configuration file

Couldn't load CKFinder configuration file. Please run artisan vendor:publish --tag=ckfinder command first.
I've run artisan vendor:publish --tag=ckfinder

I got this issue when i have public_path in public_html:
+laravel
++blog (here my laravel)
+public_html(here my public)
How then the right setting?

laravel framework 6.X Still fail

Using version ^3.5 for ckfinder/ckfinder-laravel-package
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for ckfinder/ckfinder-laravel-package ^3.5 -> satisfiable by ckfinder/ckfinder-laravel-package[v3.5.1].
- Conclusion: remove laravel/framework v6.3.0
- Conclusion: don't install laravel/framework v6.3.0
- ckfinder/ckfinder-laravel-package v3.5.1 requires laravel/framework ^5.5 -> satisfiable by laravel/framework[5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev].
- Can only install one of: laravel/framework[5.5.x-dev, v6.3.0].
- Can only install one of: laravel/framework[5.6.x-dev, v6.3.0].
- Can only install one of: laravel/framework[5.7.x-dev, v6.3.0].
- Can only install one of: laravel/framework[5.8.x-dev, v6.3.0].
- Installation request for laravel/framework (locked at v6.3.0, required as ^6.0) -> satisfiable by laravel/framework[v6.3.0].

Installation failed, reverting ./composer.json to its original content.

Laravel 5.8 integration

i did try custom Middleware with Auth of laravel but Auth always return null .
if (\Auth::check()) { config(['ckfinder.authentication' => function () use ($request) { return true; }]); } else config(['ckfinder.authentication' => function () use ($request) { return false; }]); }

Authentication in config file is useless

I have CKFinder up and running in my project perfectly, but the issue arose when I came to secure it.

The Authentication part is inside the config file, I can not access the session in this file and I can not check for my admin flag in the user's table here.

How do I overcome this?

ckfinder in iframe - attach token

I'm trying to open CKFinder in iframe. Problem is that I have middleware checking routes for browser and connector.
When I hit example.com/ckfinder/browser?token=123 everything works fine.
But when I pass exactly the same URL into iframe I get response: Please attach your Bearer token. I updated setup.php in vendor package like this:

CKFinder.config( { connectorPath: <?php echo json_encode(route('ckfinder_connector')) ?>, pass: 'token', token: '<?php echo (isset($_GET['token'])) ? $_GET['token'] : "" ?>', } );

but still not working...
Any advice how to make it work in iframe?

How can i use, if my laravel project is an RestAPI

I have a SPA in vuejs on another server which has ckeditor and ckfinder hook up together for frontend users to upload images. and i also have a RestAPI in laravel how can i use the RestAPI as connector only no frontend nothing with this package.

looking for something like this when user upload images
domain.com/api/ckfinder/upload...... how can i achieve this with this package?

Error In ServiceProvider.php line 173: array_key_exists(): The first argument should be either a string or an integer

While I stack trace that error I found this:

[2021-03-25 09:20:58] local.ERROR: array_key_exists(): The first argument should be either a string or an integer {"exception":"[object] (ErrorException(code: 0): array_key_exists(): The first argument should be either a string or an integer at F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php:173)
[stacktrace]
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'array_key_exist...', 'F:\\wamp64\\www\\o...', 173, Array)
#1 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php(173): array_key_exists(Array, Array)
#2 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php(147): Illuminate\Support\ServiceProvider->addPublishGroup(Array, Array)
#3 F:\wamp64\www\oasis.kz\oasis_new\vendor\ckfinder\ckfinder-laravel-package\src\CKFinderServiceProvider.php(27): Illuminate\Support\ServiceProvider->publishes(Array, Array)
#4 [internal function]: CKSource\CKFinderBridge\CKFinderServiceProvider->boot()
#5 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(29): call_user_func_array(Array, Array)
#6 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#7 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#8 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Container\Container.php(564): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#9 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(794): Illuminate\Container\Container->call(Array)
#10 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(777): Illuminate\Foundation\Application->bootProvider(Object(CKSource\CKFinderBridge\CKFinderServiceProvider))
#11 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(Object(CKSource\CKFinderBridge\CKFinderServiceProvider), 15)
#12 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(778): array_walk(Array, Object(Closure))
#13 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\BootProviders.php(17): Illuminate\Foundation\Application->boot()
#14 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(206): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))
#15 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(297): Illuminate\Foundation\Application->bootstrapWith(Array)
#16 F:\wamp64\www\oasis.kz\oasis_new\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(120): Illuminate\Foundation\Console\Kernel->bootstrap()
#17 F:\wamp64\www\oasis.kz\oasis_new\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 {main}
"}

Laravel version 5.6. php version: 7.4

Routes not registered in PHPUnit tests

When running PHPUnit tests the CKFinder connector routes are not defined. This will result in a route not defined error when returning views with @include('ckfinder::setup')

This is a result of the CKFinderServiceProvider. The service provider checks if we are runningInConsole, registers some commands and returns. Leaving us with no routes.

Does anyone have a suggestion on how to solve this?
Maybe extend the if-check with $this->app->runningInConsole() && !$this->app->runningUnitTests() ?

[BUG] Thrown errors are not getting caught

This is a major bug imho.
Thrown errors are not getting properly caught and the actual error doesn't shown to the user but rather the 500 error page.
This happens both when throwing exception from a plugin (error is thrown just like documented):

throw new \Exception('Storage quota exceeded', Error::CUSTOM_ERROR);

This also happens at the core components, for instance, try creating a new folder with an existing name, it will throw an exception and since its not getting caught and handled properly laravel just return the regular error page (in this case 500 error page) and that is what gets displayed in the CKFinder's modal.

"Unknown error." with S3 adapter

im trying to configure my ckfinder with my DigitalOcean Spaces/ S3 space, but i get the error:

"Unknown error."

when I try to open the ckfinder.

this is the configuration:

$config['backends']['default'] = array(
    'name'         => 'default',
    'adapter'      => 's3',
    'bucket'       => 'projectx',
    'region'       => 'ams3',
    'key'          => '****',
    'secret'       => '*****',
    'visibility'   => 'public',
    'baseUrl'      => 'https://ams3.digitaloceanspaces.com/projectx/',
  function selectFileWithCKFinder( elementId ) {
    CKFinder.modal( {
      chooseFiles: true,
      width: 800,
      height: 600,
      rememberLastFolder: false,
      startupPath: "kk/gallery:"+ values,
      skin: 'jquery-mobile',

      onInit: function( finder ) {
        finder.on( 'files:choose', function( evt ) {
          var file = evt.data.files.first();
          var output = document.getElementById( elementId );
          output.value = file.getUrl();
        } );
        finder.on( 'file:choose:resizedImage', function( evt ) {
          var output = document.getElementById( elementId );
          output.value = evt.data.resizedUrl;
        } );
      }
    } );
  }

the pictures are respectively in: https://ams3.digitaloceanspaces.com/projectx/kk/gallery/id(value selected)

how come I can't view any images? any ideas? bucket access data is correct and tested.

artisan command issue

$ php artisan ckfinder:download
There are no commands defined in the "ckfinder" namespace.

Change upload destination

Hello
I need to change the upload destination according to the user, I saw that the destination is written in the config / ckfinder.php file but inside that file I can't use either the Auth class or the User class, you could tell me how to do it for change folder destination based on user ID?

Possible to override the default routes?

Is it possible to override the default routes?
my routes setup handles both the backend and the front-end (by subdomain), currently CKFinder is available at both.
Is it possible to disable the default routes and provide my own?

[BUG REPORT] CKFinder 3 & Laravel lumen routes

Is this a bug report or feature request? (choose one)

🐞 Bug report

💻 Version of CKFinder

CKFinder 3

📋 Steps to reproduce

  1. composer require ckfinder/ckfinder-laravel-package
  2. php artisan ckfinder:download.
  3. php artisan vendor:publish --tag=ckfinder.
  4. mkdir -m 777 public/userfiles
  5. Tap "http://localhost:8000/ckfinder/connector?command=Init"

✅ Expected result

I should see the connector JSON response after navigating to the /ckfinder/connector?command=Init address.

❎ Actual result

Getting an error Call to undefined method Laravel\Lumen\Routing\Router::any().
and I guess it is a normal error because it's Laravel Lumen version .

Auto generating thumbnails in a public folder after upload

Can someone please show me a way to make ckfinder-laravel to generate thumbnails (in a public folder) automatically after uploading images? It would be great if it can use $config['images'][sizes] for generating thumbnails.
I tried to use THIS plugin but I get Invalid connector plugin: ThumbPregenerator. I could use none of the default plugins ('DiskQuota', 'GetFileInfo', 'UserActionsLogger') Always getting same error : Invalid connector plugin: DiskQuota.

It's not working (Laravel 6)

Hi
I followed all the instructions but when testing: /ckfinder/connector?command=Init

I get the following error:
Illuminate\Contracts\Container\BindingResolutionException
Target class [App\Http\Controllers\CKSource\CKFinderBridge\Controller\CKFinderController] does not exist.

how i can change baseUrl with custom folder

I try to add baseurl with custom url in config.php

'baseUrl' => '/storage/books/bookdetails/{{ $book->book_name_slug }}/',

but it not work, i create folder in same link it also not work
which way i wrong

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.