mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Remove timestamps from converted images to make them deterministic (#11408)
This commit is contained in:
parent
92569ffde8
commit
501148ab91
@ -113,7 +113,7 @@ class MediaAttachment < ApplicationRecord
|
|||||||
has_attached_file :file,
|
has_attached_file :file,
|
||||||
styles: ->(f) { file_styles f },
|
styles: ->(f) { file_styles f },
|
||||||
processors: ->(f) { file_processors f },
|
processors: ->(f) { file_processors f },
|
||||||
convert_options: { all: '-quality 90 -strip' }
|
convert_options: { all: '-quality 90 -strip +set modify-date +set create-date' }
|
||||||
|
|
||||||
validates_attachment_content_type :file, content_type: IMAGE_MIME_TYPES + VIDEO_MIME_TYPES + AUDIO_MIME_TYPES
|
validates_attachment_content_type :file, content_type: IMAGE_MIME_TYPES + VIDEO_MIME_TYPES + AUDIO_MIME_TYPES
|
||||||
validates_attachment_size :file, less_than: IMAGE_LIMIT, unless: :larger_media_format?
|
validates_attachment_size :file, less_than: IMAGE_LIMIT, unless: :larger_media_format?
|
||||||
|
Loading…
Reference in New Issue
Block a user