Joro Seksa
Joro Seksa

Reputation: 1583

Where should i store images on my content management system?

I am developing a content management system and i decided to store my images on the hard drive instead on the database.

However there is a problem and here it is:

When i develop the system i am programing it on my local server and then upload it on the remote server. If the images are stored on the hard drive in the direktory of the web application they will be automatically deleted when i deploy the new version. So the question is where should i exactly store the images?

Upvotes: 0

Views: 140

Answers (1)

Rick Mangi
Rick Mangi

Reputation: 3769

You have a lot of choices and it depends on how much storage you need. Assuming you're using a linux server (EC2?) you should create a mount on a separate disk and give the web server process access to that disk. Mount it somewhere like /data. If you're on EC2 you could use an EBS volume for this mount and easily upgrade it if you need more disk space later (copy it to a new volume and move that to the mount point)

Alternatively a lot of people use S3 to store files because it's cheap, you can get a url to the image and easily front it with amazon's CDN.

Upvotes: 1

Related Questions