Code Monkey home page Code Monkey logo

Comments (4)

zaak avatar zaak commented on August 27, 2024

Hi @Askancy. I have just checked Laravel 5.8 and everything seems to work fine. Have you tried clearing the cache with artisan cache:clear? Refreshing the Composer's autoload might help too.

should I declare it also in the kernel.php?

It is not required to register the middleware there. CKFinder will register it automatically on controller level using the class defined in $config['authentication'] = '\App\Http\Middleware\CKFinderAuth';.

Could you please add a complete code of \App\Http\Middleware\CKFinderAuth?

from ckfinder-laravel-package.

Askancy avatar Askancy commented on August 27, 2024

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

in the middleware I used the code you provided for example

<?php

namespace App\Http\Middleware;

use Closure;

class CKFinderAuth
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
     public function handle($request, Closure $next)
     {
         config(['ckfinder.authentication' => function() {
             return true;
         }]);
         return $next($request);
     }
}

these are the only values I modified in the configuration file:

$config['authentication'] = '\App\Http\Middleware\CKFinderAuth';
    'name'         => 'default',
    'adapter'      => 'local',
    'baseUrl'      => env('APP_URL').'/upload/etc',
    'root'         => public_path('/upload/etc'),
    'chmodFiles'   => 0777,
    'chmodFolders' => 0755,
    'filesystemEncoding' => 'UTF-8'

from ckfinder-laravel-package.

zaak avatar zaak commented on August 27, 2024

@Askancy: Could you please contact us through the support channel? We could then discuss the configuration details that might be considered sensitive in a public discussion.

from ckfinder-laravel-package.

Askancy avatar Askancy commented on August 27, 2024

it's work, was a local problem, on server is ok. I wanted to ask something. I have to select a category via a bootstrap-select, depending on the selection I need the CKFinder to go to a specific folder, is it possible to address the default folder via javascript?

from ckfinder-laravel-package.

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.