GOT ISSUES When Getting Image

So the upload is working but when getting the image its not letting me laod the picture I already have a storage link And set the APP_URL=http://127.0.0.1:8000 ASSET_URL=http://127.0.0.1:8000 But when i upload th epic its uploading but not getting the image and help would do.
No description
No description
No description
47 Replies
LeandroFerreira
LeandroFerreira7mo ago
Can you see the file in the storage folder?
Cheesus Krays
Cheesus KraysOP7mo ago
Yep
Cheesus Krays
Cheesus KraysOP7mo ago
No description
Cheesus Krays
Cheesus KraysOP7mo ago
here they are uploading My friend is having this issues as well
LeandroFerreira
LeandroFerreira7mo ago
did you run php artisan storage:link? Could you try APP_URL=http://localhost:8000/ ?
Cheesus Krays
Cheesus KraysOP7mo ago
Wait lemme try it Do i have to run php artisan storage:link? Like I just fetch this into github
LeandroFerreira
LeandroFerreira7mo ago
you should run this
Cheesus Krays
Cheesus KraysOP7mo ago
okok lemme run it
Cheesus Krays
Cheesus KraysOP7mo ago
No description
Cheesus Krays
Cheesus KraysOP7mo ago
heres what happen
Cheesus Krays
Cheesus KraysOP7mo ago
No description
Cheesus Krays
Cheesus KraysOP7mo ago
it still not working
LeandroFerreira
LeandroFerreira7mo ago
is there a public/storage folder?
Cheesus Krays
Cheesus KraysOP7mo ago
yes
Cheesus Krays
Cheesus KraysOP7mo ago
No description
LeandroFerreira
LeandroFerreira7mo ago
maybe this
No description
Cheesus Krays
Cheesus KraysOP7mo ago
how
LeandroFerreira
LeandroFerreira7mo ago
did you try with localhost instead of 127.0.0.1? I mean /public/storage, not /storage/app/public as your image
Cheesus Krays
Cheesus KraysOP7mo ago
u mean this? APP_URL=http://localhost:8000/ ASSET_URL=http://localhost:8000/ yea it give me the error this error
No description
LeandroFerreira
LeandroFerreira7mo ago
confirm here /public/storage
Cheesus Krays
Cheesus KraysOP7mo ago
OHHH I dont have any files on that
Cheesus Krays
Cheesus KraysOP7mo ago
No description
Cheesus Krays
Cheesus KraysOP7mo ago
How do i make it upload to storage
LeandroFerreira
LeandroFerreira7mo ago
php artisan storage:link should link this folder
Cheesus Krays
Cheesus KraysOP7mo ago
can i delete that folder? I mean Its giving me the its already existed
LeandroFerreira
LeandroFerreira7mo ago
maybe this
cd public
rm storage
cd ..
php artisan storage:link
cd public
rm storage
cd ..
php artisan storage:link
Cheesus Krays
Cheesus KraysOP7mo ago
The console does not give me errror now. But the picture is not showing
No description
No description
LeandroFerreira
LeandroFerreira7mo ago
are you using docker?
Cheesus Krays
Cheesus KraysOP7mo ago
Nope i am using just local and npm run dev and xampp for database mysql Its worlking What i did is Change the APP url APP_URL=http://localhost:8000/ ASSET_URL=http://localhost:8000/ To APP_URL=http://localhost:8000
LeandroFerreira
LeandroFerreira7mo ago
No description
Cheesus Krays
Cheesus KraysOP7mo ago
YEA ITS WORKING THANK YOUU SO MUCH MAN If i this thing work I'll put you to my acknowledgement papers i'll stay in touch here <33
Cheesus Krays
Cheesus KraysOP7mo ago
@Leandro Ferreira Hey, Sorry for calling another help S,o I am trying to fix my Mate Problem Too. its kinda same but different. He is getting this error
Access to fetch at 'http://localhost/storage/categories/01HX91YAZKHVZN7WG1Q04XNND4.jpg' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
localhost/storage/categories/01HX91YAZKHVZN7WG1Q04XNND4.jpg:1


Failed to load resource: net::ERR_FAILED
file-upload.js?v=3.2.57.0:40




Uncaught (in promise) TypeError: Failed to fetch
at load (file-upload.js?v=3.2.57.0:40:84147)
at r (file-upload.js?v=3.2.57.0:2:579)
at Object.n [as load] (file-upload.js?v=3.2.57.0:2:458)
at Object.f [as load] (file-upload.js?v=3.2.57.0:2:10186)
at Object.ADD_ITEM (file-upload.js?v=3.2.57.0:2:19425)
at u (file-upload.js?v=3.2.57.0:1:592)
at file-upload.js?v=3.2.57.0:2:14178
at Array.forEach (<anonymous>)
at Object.DID_SET_FILES (file-upload.js?v=3.2.57.0:2:14111)
at u (file-upload.js?v=3.2.57.0:1:592)
Access to fetch at 'http://localhost/storage/categories/01HX91YAZKHVZN7WG1Q04XNND4.jpg' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
localhost/storage/categories/01HX91YAZKHVZN7WG1Q04XNND4.jpg:1


Failed to load resource: net::ERR_FAILED
file-upload.js?v=3.2.57.0:40




Uncaught (in promise) TypeError: Failed to fetch
at load (file-upload.js?v=3.2.57.0:40:84147)
at r (file-upload.js?v=3.2.57.0:2:579)
at Object.n [as load] (file-upload.js?v=3.2.57.0:2:458)
at Object.f [as load] (file-upload.js?v=3.2.57.0:2:10186)
at Object.ADD_ITEM (file-upload.js?v=3.2.57.0:2:19425)
at u (file-upload.js?v=3.2.57.0:1:592)
at file-upload.js?v=3.2.57.0:2:14178
at Array.forEach (<anonymous>)
at Object.DID_SET_FILES (file-upload.js?v=3.2.57.0:2:14111)
at u (file-upload.js?v=3.2.57.0:1:592)
(on Pic) I already set its APP URL and delete its public storage and type php artisan storage:link
No description
Cheesus Krays
Cheesus KraysOP7mo ago
Wdyt the problem
LeandroFerreira
LeandroFerreira7mo ago
you should also access with localhost on the browser
Cheesus Krays
Cheesus KraysOP7mo ago
How do I do that
LeandroFerreira
LeandroFerreira7mo ago
No description
Cheesus Krays
Cheesus KraysOP7mo ago
yea i alrady type it
Cheesus Krays
Cheesus KraysOP7mo ago
in here?
No description
LeandroFerreira
LeandroFerreira7mo ago
blocked by CORS, you can't. access http://localhost/storage/categories/01HX91YAZKHVZN7WG1Q04XNND4.jpg from http://127.0.0.1:8000
Cheesus Krays
Cheesus KraysOP7mo ago
Sorry, I am still confuse hehe
LeandroFerreira
LeandroFerreira7mo ago
what is the APP_URL value? what is the error in the browser?
Cheesus Krays
Cheesus KraysOP7mo ago
No description
Cheesus Krays
Cheesus KraysOP7mo ago
No description
Cheesus Krays
Cheesus KraysOP7mo ago
heere
LeandroFerreira
LeandroFerreira7mo ago
are you sure? This doesn't make sense if the browser error is showing http://localhost... Try to clear laravel cache try the same you did here https://discord.com/channels/883083792112300104/1237448884251525260/1237458049606877315
Dennis Koch
Dennis Koch7mo ago
Yeah sounds like the config is cached
Cheesus Krays
Cheesus KraysOP7mo ago
yEA Its already good
Want results from more Discord servers?
Add your server