Question

I created a image with rails apps by using rmagick and save the images to public/images.

But it looks like capistrano default rails job reset the folder each deploy.

Should I configure capistrano that public/images must not deleted. Or first of all that was wrong idea to generate images to public/images?

Was it helpful?

Solution

Generally, the standard is to keep the publicly accessible content in the public directory. And for storing images we can use both public directory (provided we want them to be publicly accessible) or in some cloud based storage like Amazon s3. That is perfectly based on the requirement.

And finally, as you are keeping some dynamically generated data or may be user uploaded data in public directory, you should configure capistrano not to delete/modify those data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top