I am working on a Ruby on Rails web application. The user can upload files and they are saved in Amazons S3. I use paperclip pearls to upload files.
How can I encrypt files using AES256 before saving them? I know that S3 has server-side encryption, but actually it does not work for me, because I open the site in a mobile application and want to handle decryption on the client.
I know that I can use paperclip processors or before_post_process methods, but how can I get a downloadable file and modify it?
source share