@@unitedtoptech6288 Reading a file from memory either it's RAM or drive in server is not an option for me when it comes to production. For most applications, you'll likely need to store images either for historical reference or for other purposes. Assuming you'll use a database to store metadata about the files, like ownership information, you'll also need to upload them to a storage solution such as S3 or Cloud Storage. This allows you to upload the file to that storage and retrieve the URL instead of persisting the raw image/file data in the database and reading the file every time on the server. Keeping files on the server can lead to various issues, including performance drawbacks, especially if you're storing them in RAM, even with base64 encoding.
Awesome tutorial 🤩
Thanks, I'm glad you liked it! 👍
Thanks a lot!!!
welcome!!!
What if i dont want to keep the image in the same path?
but fs.readFileSync takes up different path
you need to add the folder paths with the image name
Obrigado.
welcome!
Please give me the github code
I do not have it in github
Why everyone is trying to read the image from the disk directly? You can send URL which is a better option, obviously.
Yeah but what if you try uploading an image ? you won't be having url for that
@@unitedtoptech6288 Reading a file from memory either it's RAM or drive in server is not an option for me when it comes to production. For most applications, you'll likely need to store images either for historical reference or for other purposes. Assuming you'll use a database to store metadata about the files, like ownership information, you'll also need to upload them to a storage solution such as S3 or Cloud Storage. This allows you to upload the file to that storage and retrieve the URL instead of persisting the raw image/file data in the database and reading the file every time on the server. Keeping files on the server can lead to various issues, including performance drawbacks, especially if you're storing them in RAM, even with base64 encoding.
Wow! thanks for the info