Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is storing files for users in my server a bad practice?

Hey there so I have a Express js + React js application. I currently use MySQl for my database management. In my database I store variables for each user such as their email, password(hashed), and their user id. This works great; however, I wish to make an inventory for the user. This would be an array where it has values to save the ID of the item they own and the name of it. How would I go about doing this? Should I make something in my database? Or create a text/json file storing those variables to describe their inventory and store it on the server? Any answers will help! I am extremely new to developing full-stack web applications.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Short answer:
Yes

The long answer:
There are over 10 million hackers in the world today and even the newest hackers know how to hijack a system using malware. This means that storing user uploaded media files on the same system as server files is exposing the entire server and it’s files responsible for it’s activities to the probability of a hijack.

Where then should I store the files?
Use a CDN (Content delivery network).

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading