voyager: Wrong path to storage

  • Laravel Version: 5.4.25
  • Voyager Version: 0.11.12
  • PHP Version: 5.6.30
  • Database Driver & Version: MySQL 5.6.35

Description:

Having created a new user, the avatar was showing as a broken image. I uploaded a new image, but the image remained broken.

I checked with Console in Google Chrome and found 3 404 errors:

2017-06-19 10:53:50.159 http://localhost:8888/storage/users/June2017/ypKlbqbATDbpnYctZBFp.png Failed to load resource: the server responded with a status of 404 (Not Found)

2017-06-19 10:53:50.256 http://localhost:8888/storage/users/June2017/ypKlbqbATDbpnYctZBFp.png Failed to load resource: the server responded with a status of 404 (Not Found)

2017-06-19 10:53:50.473 http://localhost:8888/vendor/tcg/voyager/assets/images/bg.jpg Failed to load resource: the server responded with a status of 404 (Not Found)

When I looked at the project, the paths for the 2 storage errors are: http://localhost:8888/storage/app/public/users/ and: http://localhost:8888/storage/app/public/users/June2017

Is this a configuration error?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

I had the same issues last time, but I did that way. Can you try built in server:

php artisan serve

and adjust the .env: APP_URL=http://localhost:8000

@fletch3555 yeah i agree its the same thing the port is the prob i just wrote what did so adding the port is enough

@hind77, your app.php change is unnecessary as it just uses the APP_URL value. Also, http://localhost:8000 should work just fine as well. Your issue was most likely the missing port, rather than localhost vs 127.0.0.1

try to use APP_URL=http://127.0.0.1:8000 instead of APP_URL=http://localhost:8888