Commit 84404352 authored by Jarka Košanová's avatar Jarka Košanová

Fix workhorse temp path for namespace uploads

parent 2054199b
......@@ -21,6 +21,10 @@ class NamespaceFileUploader < FileUploader
File.join(model.id.to_s)
end
def self.workhorse_local_upload_path
File.join(options.storage_path, 'uploads', TMP_UPLOAD_PATH)
end
# Re-Override
def store_dir
store_dirs[object_store]
......
---
title: Fix workhorse temp path for namespace uploads
merge_request: 21650
author:
type: fixed
......@@ -40,6 +40,12 @@ describe NamespaceFileUploader do
end
end
describe '#workhorse_local_upload_path' do
it 'returns the correct path in uploads directory' do
expect(described_class.workhorse_local_upload_path).to end_with('/uploads/tmp/uploads')
end
end
describe "#migrate!" do
before do
uploader.store!(fixture_file_upload(File.join('spec/fixtures/doc_sample.txt')))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment