Help with images and videos

Hi, I'd like to know what is the easiest and best way to save images
and videos (both plural) into a model.

Also I'd like to know how to upload and change those videos and images
with the active admin gem for an admin interface (the admin is the
only one that will access this model).

Thank you,

Have you considered storing the content outside the database and using filenames with a path to reference them?


But how do I do that so that an admin can upload files at the admin interface? so that this admin doesn’t need to know anything about programming or that setup.

Add a field for the filename in the model object. populate this with the name of the file uploaded that you’d otherwise put in to the database.

An alternative is to store the files in the database as a blob, but what if your database is then full of 20Mb rows?


how do i upload that file to amazon s3, for example, using the active admin interface? and how do i get that file name?

I can’t help with that - what do the S3 docs say?