Create the CHUNKED_UPLOADER_SERVICE ENV variable

This commit is contained in:
Eric 2020-05-08 14:11:12 -05:00
parent 2b323f9bbc
commit feb691f192

View file

@ -1,4 +1,6 @@
# frozen_string_literal: true
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
CHUNKED_UPLOADER = ENV['CHUNKED_UPLOAD_CLASS'] ? ENV['CHUNKED_UPLOAD_CLASS'].constantize : ChunkedUploader::S3
CHUNKED_UPLOADER_SERVICE = ENV['CHUNKED_UPLOADER_SERVICE'] ? ActiveStorage::Service.configure(
ENV['CHUNKED_UPLOADER_SERVICE'],
Rails.configuration.active_storage.service_configurations) : ActiveStorage::Blob.service