tharindu-dm / Kamper

Rapid Application Development using MERN Stack
2 stars 0 forks source link

UPLOADING IMAGES #7

Closed tharindu-dm closed 1 month ago

tharindu-dm commented 1 month ago

when uploading images using link or from device, Uncaught runtime errors:

Uncaught runtime errors:
×
ERROR
Request failed with status code 404
AxiosError: Request failed with status code 404
    at settle (http://localhost:3000/Kamper/static/js/bundle.js:53422:12)
    at XMLHttpRequest.onloadend (http://localhost:3000/Kamper/static/js/bundle.js:52085:66)
    at Axios.request (http://localhost:3000/Kamper/static/js/bundle.js:52575:41)
tharindu-dm commented 1 month ago

check these functions:

tharindu-dm commented 1 month ago

upload is working but, now it doesn't show the image. image is not rendered to the site

tharindu-dm commented 1 month ago

src={"http://localhost:3000/api" + link }

generates: http://localhost:3000/uploads/uploads\62887632cb58dd17376a63767dda5329.jpg find where the uploads\3528305y285.jpg comes from

also check whether renameing works

tharindu-dm commented 1 month ago

somehow the image name seems like it got an encrypted or hashed. doesn't include current date

tharindu-dm commented 1 month ago

IT SHOULD BE LOCALHOST:4000 !!!