It saves on your computer because the whole environment is your computer. if you install and run the application on a server, it will save it on the server local disk.
btw, you can convert your image file to a base64 string and store it using mongo as a simples string value. but it will be a veeeery large string.
Just don't forget to compress it – lzw (sample) works great, but you could always put together a custom one (maybe based on the fact that base64 strings contain only a limited subset of characters)
I recently worked on a tutorial video from javascriptmastery. I saw how he stored image in base64 string. But what I am trying to do is build my back-end api. So those images can be hosted. For instance, making a get request to this route ...localhost:5000/api/v1/productid/imageName. Brings out that particular image for that product. Just something I've seen and wanted to try out
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It saves on your computer because the whole environment is your computer. if you install and run the application on a server, it will save it on the server local disk.
btw, you can convert your image file to a base64 string and store it using mongo as a simples string value. but it will be a veeeery large string.
Just don't forget to compress it – lzw (sample) works great, but you could always put together a custom one (maybe based on the fact that base64 strings contain only a limited subset of characters)
I recently worked on a tutorial video from javascriptmastery. I saw how he stored image in base64 string. But what I am trying to do is build my back-end api. So those images can be hosted. For instance, making a get request to this route ...localhost:5000/api/v1/productid/imageName. Brings out that particular image for that product. Just something I've seen and wanted to try out