Fix to be able to redownload avatar and header (#16190)

* Fix to reset if header and avatar download fails

* Add RedownloadAvatarWorker and RedownloadHeaderWorker
This commit is contained in:
Takeshi Umeda 2021-05-11 21:19:22 +09:00 committed by GitHub
parent b5ad787ebf
commit c403c3695b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 72 additions and 4 deletions

View file

@ -22,7 +22,7 @@ module AccountHeader
has_attached_file :header, styles: ->(f) { header_styles(f) }, convert_options: { all: '-strip' }, processors: [:lazy_thumbnail]
validates_attachment_content_type :header, content_type: IMAGE_MIME_TYPES
validates_attachment_size :header, less_than: LIMIT
remotable_attachment :header, LIMIT
remotable_attachment :header, LIMIT, suppress_errors: false
end
def header_original_url