4

I am using Laravel 5.5 on shared hosting, so I have the public directory as the base with all the Laravel files in a sub directory called Laravel.

Everything works OK except uploading an image. It is not giving any error messages, but when I look for the image there is the name without an image itself.

I have placed an exception in the middleware csrf:

protected $except = [ 'laravel-filemanager/*' ];

When I upload it is saying the Url of the image is http://coyneproperties.co.uk/laravel-filemanager/photos/1/electrichybrid.png, for example.

In app/Providers/AppServiceProvider.php I have this code:

public function register() { $this->app->bind('path.public', function() { return base_path('/../public_html'); }); }

but it simply is not uploading anything to the right place.

I have not changed anything in the lfm.php file.

Jim
  • 596
  • 1
  • 10
  • 36
  • but it simply is not uploading anything to the right place. then where is the file being uploaded what is the path? – Sagar Ahuja Jul 30 '18 at 09:28
  • Make sue the public folder have permission 777 – Ahmed Bermawy Jul 30 '18 at 09:31
  • I have made sure all is 777 – Jim Jul 31 '18 at 11:20
  • If I upload a file to the server it reports that the file is http://domainname/photos/1/31-07-2018_11-45-31.png, but it is not there. Instead it is placing it in a subdirectory laravel (which is where all the laravel stuff is) and then public/images/1 etc so in truth it is in /laravel/public/photos/1 – Jim Jul 31 '18 at 11:33

0 Answers0