Make watermark configurable

This commit is contained in:
Paul Chavard 2020-11-24 14:19:36 +01:00
parent b48e7813d2
commit 18dfacb933
3 changed files with 5 additions and 1 deletions

View file

@ -3,7 +3,7 @@ class TitreIdentiteWatermarkJob < ApplicationJob
MAX_IMAGE_SIZE = 1500
SCALE = 0.9
WATERMARK = Rails.root.join('app/assets/images/watermark.png')
WATERMARK = Rails.root.join("app/assets/images/#{WATERMARK_FILE}")
def perform(blob)
blob.open do |file|

View file

@ -23,3 +23,6 @@ APPLICATION_BASE_URL="https://www.demarches-simplifiees.fr"
# Personnalisation d'instance - Page externe "Disponibilité" (status page)
# STATUS_PAGE_URL=""
# Personnalisation d'instance - fichier utilisé pour poser un filigrane sur les pièces d'identité
# WATERMARK_FILE=""

View file

@ -0,0 +1 @@
WATERMARK_FILE = ENV.fetch('WATERMARK_FILE', 'watermark.png')