feat: can have remote watemark file

This commit is contained in:
Jon 2022-01-28 18:15:43 +01:00 committed by François Vantomme
parent 299a98b3cb
commit 88d3a6e4c3
No known key found for this signature in database
GPG key ID: 75A448E06F6B75F8

View file

@ -12,7 +12,7 @@ class TitreIdentiteWatermarkJob < ApplicationJob
MAX_IMAGE_SIZE = 1500
SCALE = 0.9
WATERMARK = Rails.root.join("app/assets/images/#{WATERMARK_FILE}")
WATERMARK = URI.parse(WATERMARK_FILE).is_a?(URI::HTTP) ? WATERMARK_FILE : Rails.root.join("app/assets/images/#{WATERMARK_FILE}")
def perform(blob)
if blob.virus_scanner.pending? then raise FileNotScannedYetError end