Giter Site home page Giter Site logo

Not Found Error about laravel-file-manager HOT 7 CLOSED

alexusmai avatar alexusmai commented on August 16, 2024
Not Found Error

from laravel-file-manager.

Comments (7)

alexusmai avatar alexusmai commented on August 16, 2024 1

The problem in the your URL http://localhost/laravel58/public - public- it should be a root folder, and URL should be like this - http://localhost

See laravel docs

After installing Laravel, you should configure your web server's document / web root to be the public directory. The  index.php in this directory serves as the front controller for all HTTP requests entering your application.

from laravel-file-manager.

alexusmai avatar alexusmai commented on August 16, 2024

Show your configuration files - filesystems.php and file-manager.php

from laravel-file-manager.

nkuldip avatar nkuldip commented on August 16, 2024

Here is code
file-manager.php
`<?php

return [

/**
 * list of disk names that you want to use
 * (from config/filesystems)
 */
'diskList'  => ['images', 'public'],

/**
 * Default disk for left manager
 * null - auto select the first disk in the disk list
 */
'leftDisk'  => null,

/**
 * Default disk for right manager
 * null - auto select the first disk in the disk list
 */
'rightDisk' => null,

/**
 * Default path for left manager
 * null - root directory
 */
'leftPath'  => null,

/**
 * Default path for right manager
 * null - root directory
 */
'rightPath' => null,

/**
 * Image cache ( Intervention Image Cache )
 * set null, 0 - if you don't need cache (default)
 * if you want use cache - set the number of minutes for which the value should be cached
 */
'cache' => null,

/**
 * File manager modules configuration
 * 1 - only one file manager window
 * 2 - one file manager window with directories tree module
 * 3 - two file manager windows
 */
'windowsConfig' => 2,

/***************************************************************************
 * Middleware
 * Add your middleware name to array -> ['web', 'auth', 'admin']
 * !!!! RESTRICT ACCESS FOR NON ADMIN USERS !!!!
 *
 * !!! For using ACL - add 'fm-acl' to array !!! ['web', 'fm-acl']
 */
'middleware' => ['web', 'fm-acl'],

/***************************************************************************
 * ACL mechanism ON/OFF
 *
 * default - false(OFF)
 */
'acl' => true,

/**
 * Hide files and folders from file-manager if user doesn't have access
 * ACL access level = 0
 */
'aclHideFromFM' => true,

/**
 * ACL strategy
 *
 * blacklist - Allow everything(access - 2 - r/w) that is not forbidden by the ACL rules list
 *
 * whitelist - Deny anything(access - 0 - deny), that not allowed by the ACL rules list
 */
'aclStrategy'   => 'blacklist',

/**
 * ACL rules repository
 *
 * default - config file(ConfigACLRepository)
 */
'aclRepository' => Alexusmai\LaravelFileManager\Services\ACLService\ConfigACLRepository::class,
//'aclRepository' => Alexusmai\LaravelFileManager\Services\ACLService\DBACLRepository::class,

/**
 * ACL rules list - used for default repository
 *
 * 1 it's user ID
 * null - for not authenticated user
 *
 * 'disk' => 'disk-name'
 *
 * 'path' => 'folder-name'
 * 'path' => 'folder1*' - select folder1, folder12, folder1/sub-folder, ...
 * 'path' => 'folder2/*' - select folder2/sub-folder,... but not select folder2 !!!
 * 'path' => 'folder-name/file-name.jpg'
 * 'path' => 'folder-name/*.jpg'
 *
 * * - wildcard
 *
 * access: 0 - deny, 1 - read, 2 - read/write
 */
'aclRules'      => [
    null => [
        //['disk' => 'public', 'path' => '/', 'access' => 2],
    ],
    1 => [
        //['disk' => 'public', 'path' => 'images/arch*.jpg', 'access' => 2],
        //['disk' => 'public', 'path' => 'files/*', 'access' => 1],
    ],
],

/**
 * ACL Rules cache
 *
 * null or value in minutes
 */
'aclRulesCache' => null,

];
?>**filesystems.php**<?php

return [

// Filesystem Disks
'disks' => [
// images folder in public path
'images' => [
'driver' => 'local',
'root' => public_path('images'),
'url' => env('APP_URL').'/images/',
],

// public folder in storage/app/public
'public' => [
    'driver' => 'local',
    'root' => storage_path('app/public'),
    'url' => env('APP_URL').'/storage', // https://laravel.com/docs/5.7/filesystem#file-urls
    'visibility' => 'public',
],

// ftp
'dd-wrt' => [
    'driver'   => 'ftp',
    'host'     => 'ftp.dd-wrt.com',
    'username' => 'anonymous',
    'passive'  => true,
    'timeout'  => 30,
],

],
];?>
`

from laravel-file-manager.

alexusmai avatar alexusmai commented on August 16, 2024

It's strange..
Try - composer dump-autoload

Execute command - php artisan route:list
You should have this line:

 GET|HEAD | file-manager/initialize       | fm.initialize       | Alexusmai\LaravelFileManager\Controllers\FileManagerController@initialize      | web,fm-acl

also on request - http://site-name.com/file-manager/initialize - it is possible directly in the browser - the answer should come in the form of a string with a config, if not... you have a problem with your laravel/server configuaration

from laravel-file-manager.

nkuldip avatar nkuldip commented on August 16, 2024

No any laravel/server configuaration issue,other script are working fine in local.
I am using laravel 5.8 so it's supported or not?
I try this url in local but not working,
image

from laravel-file-manager.

prappo avatar prappo commented on August 16, 2024

Where I can change the root URL ?

from laravel-file-manager.

Davixe7 avatar Davixe7 commented on August 16, 2024

Solved the same issue reinstalling the package after upgrading to Laravel 8

from laravel-file-manager.

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.