skip to Main Content

I have uploaded a laravel project in cPanel.

public folder of my project is uploaded inside public_html of cPanel. Other folders are uploaded in the root folder of cPanel.

Now Those images which are shown are uploaded while I run the project locally and those images are now inside the public_html/storage/ in cPanel.

When I am uploading another images in my project from cPanel those are uploaded inside the root folder myProjectName/storage/app/public

Here is the picture

enter image description here

Here is the red mark image is not shown and this image I have added after uploading the project in cPanel.

Any body help please?

2

Answers


  1. if use laravel storage to uploaded run below in terminal

    php artisan storage:link
    

    take care what is directory permission !!!and in sever file uploaded or not.
    if uploaded where is uploaded?

    Login or Signup to reply.
  2. To clearify some stuff, the other answer by @Mahdi Bahari would be correct.
    When files are stored outside your laravel project you must do a

    php artisan storage:link
    

    If however you are unable to get shell access with your host, then you should probably not upload images outside the laravel project. My first recommendation would be using laravel’s storage folder. Which is what laravel uses to store folders / images for the project. Laravel file storage

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search