Had this working but just updated my website on the server and it seems to have made all my uploaded files head to my public folder in my project rather than the public_html. Any idea on which file i must have uploaded and the fix?
Had this working but just updated my website on the server and it seems to have made all my uploaded files head to my public folder in my project rather than the public_html. Any idea on which file i must have uploaded and the fix?
2
Answers
You said you had it working before.
Was that on the same server…live?
If so, then could that be a server issue and not necessarily laravel issue?
Maybe you should ask your host for help and clarifications about what changed?
If you are convinced it was about what you changed…then care to show us?
Ideally if the server is cpanel, you will want to upload all your laravel files into your home’s directly…then all your
/public
folder content intopublic_html
It will look like this:
.cpanel/
app/
/public
directory…etc
You also need to go into your
/public_html
and edit theindex.php
content:And make sure it points to the correct location of your bootstrap folder..if you follow the structure above, then its ok.
Lastly, confirm that your PHP is indeed >= PHP7.0
With help from this answer: https://stackoverflow.com/a/50261573/3475551
I managed to get laravel to save uploaded files to my servers public directory instead of app/public.
Edit
app/Providers/AppServiceProvider.php
like this:Hope this helps.