laravel-filemanager: Action failed, due to server error.

Hello, i have a problem. This message appears when opens. my folder structure:

core/
   - app/
   - config/
   ...
 media/
 index.php

how can i how to set base_directory to ‘media’. I have set the config like this

 'base_directory' => 'public',

    'images_folder_name' => '../../media/photos',
    'files_folder_name'  => '../../media/files',

    'shared_folder_name' => 'shares',
    'thumb_folder_name'  => 'thumbs',

thanks

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

@nauvalazhar see here :

'base_directory' => 'public/media',

'images_folder_name' => 'photos',
'files_folder_name'  => 'files',

the problem is just faced me, and I solve it by giving the “public” folder or permissions and ownership by the following command in the terminal of the vps server of ubuntu: " sudo chmod -R 775 /var/www/laravel/public "

copy and paste this command in the ssh terminal. the problem was when I open the filemanager an Error message was just keeping popup. the message tells an error due to the server. this is my Email: ahmad.rasheed1@yahoo.com if anyone want help.

IT WORKS

i just face this issue … i don’t know what ؤause it really but …and that’s what happen

1- i got the error and i spend hours to try to solve it 2- i ignore the first error (Action failed, due to server error) 3- i used the popup widow of filer manager (image properties) and create new folder 5- and then BOOOM it works just find … and then error disappeared for ever

@g0110280 have the same issue as @harunsir

http://fm.dev/admin/filemanager/folders?working_dir=&type=&_=1489250040011 
Failed to load resource: the server responded with a status of 500 (Internal Server Error)

http://fm.dev/admin/filemanager/errors?working_dir=&type=&_=1489250040012 
Failed to load resource: the server responded with a status of 500 (Internal Server Error)

I found a solution for a while, i don’t know this is a great solution or not. But this has solved my problem, i try to move base_directory to storage and put a new route to access files in the storage directory.

Route::get('media/images/shares/{filename}', function ($filename) {
	$path = storage_path() . '/media/images/shares/' . $filename;
  if(!File::exists($path)) return view('errors.404');

  $file = File::get($path);
  $type = File::mimeType($path);

  $response = Response::make($file, 200);
  $response->header("Content-Type", $type);

  return $response;
});

i hope this helps