Copy clip not working with S3

I have a Paperclip installed as a gem, and I'm trying to update the size of the thumbnails. I execute this command:

rke paperclip: refresh: thumbnails class = User

and getting this error:

... the rake is interrupted! The specified key does not exist.

Any ideas?

Finna

+3
source share
2 answers

The user model instance does not have an icon associated with it. I.e. user did not download thumbnail. The method reprocess! does not check if a thumbnail exists for each instance of the model before trying to extract the attachment. Therefore, S3 returns:

NoSuchKey The specified key does not exist.

Or it may be due to an error while processing S3 attachments:

http://github.com/tomafro/paperclip/commit/64ae23ba01885e22cc69bf1264f339784ce32fc9

0

, , , S3. , , :

1) 2) S3 3) 4) : :

... , 1. , . ,

user.attachment.clear

, S3, , :preserve_files => true has_attached_file . , :preserve_files => true, .

0

Source: https://habr.com/ru/post/1741531/


All Articles