mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-22 17:41:55 +08:00
Configure the aws mediaconvert adapter to use a subdirectory for the output of video conversions. This way mediaconvert doesn't need full access to the uploads directory and only needs access to the subdirectory. This adds a new site setting for the media convert subdirectory to use.
16 lines
324 B
Ruby
Vendored
16 lines
324 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
class MediaconvertOutputSubdirectoryValidator
|
|
def initialize(opts = {})
|
|
@opts = opts
|
|
end
|
|
|
|
def valid_value?(val)
|
|
# Value must be present (not blank)
|
|
val.present?
|
|
end
|
|
|
|
def error_message
|
|
I18n.t("site_settings.errors.mediaconvert_output_subdirectory_required")
|
|
end
|
|
end
|