Merge pull request #6928 from adullact/feature/6886-watermark-url

Watermark depuis une URL distante
This commit is contained in:
LeSim 2022-02-08 11:45:26 +01:00 committed by GitHub
commit fdc4e5bfbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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