I cannot access images in my project for some reason. The whole assets folder is unavailable from the server side. I am trying to send an image doing something like this:
image = __dirname + "/assets/" + location.img;
Though I get an error:
(node:17741) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat ‘/app/assets/maze_6_4.jpg’
The assets folder is just a virtual folder and isn’t present in the filesystem of your project. The only way to refer to images in the assets drawer is to use the link provided. If you still want to upload images to your filesystem and refer it using paths (like how you said), then this post tells you how to do it:
Interesting, is it really that complicated to host pictures on Glitch? I wonder why. Well, thank you, I’ll strart moving stuff to my folder now, it’s gonna be a long day.