summaryrefslogtreecommitdiff
path: root/app/uploaders/object_storage.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/uploaders/object_storage.rb')
-rw-r--r--app/uploaders/object_storage.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/uploaders/object_storage.rb b/app/uploaders/object_storage.rb
index f99ad987156..36bde629f9c 100644
--- a/app/uploaders/object_storage.rb
+++ b/app/uploaders/object_storage.rb
@@ -180,10 +180,11 @@ module ObjectStorage
end
def workhorse_authorize(has_length:, maximum_size: nil)
- {
- RemoteObject: workhorse_remote_upload_options(has_length: has_length, maximum_size: maximum_size),
- TempPath: workhorse_local_upload_path
- }.compact
+ if self.object_store_enabled? && self.direct_upload_enabled?
+ { RemoteObject: workhorse_remote_upload_options(has_length: has_length, maximum_size: maximum_size) }
+ else
+ { TempPath: workhorse_local_upload_path }
+ end
end
def workhorse_local_upload_path