How to remove image from amzon in rails -


i used paperclip module amazon s3 server storing images.

i can uploaded image below line.

album_photo.avatar.url(:original)

but how can delete image s3? don't know how.

i call simple destroy method below:

def destroy   @album.destroy       respond_to |format|     format.js   end end 

but delete image db not s3.

i referred paperclip - delete file amazon s3? link don't understand.

so missing?

try ,it should automatically delete it.

<%= link_to "delete photo", photo_path, method: :delete, data: { confirm: "are sure?" }%>


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -