Merge branch 'fix-namespace-upload' into 'master'
Fix workhorse temp path for namespace uploads Closes gitlab-ee#7009 See merge request gitlab-org/gitlab-ce!21650
This commit is contained in:
commit
44931bd23d
3 changed files with 15 additions and 0 deletions
|
@ -21,6 +21,10 @@ class NamespaceFileUploader < FileUploader
|
||||||
File.join(model.id.to_s)
|
File.join(model.id.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.workhorse_local_upload_path
|
||||||
|
File.join(options.storage_path, 'uploads', TMP_UPLOAD_PATH)
|
||||||
|
end
|
||||||
|
|
||||||
# Re-Override
|
# Re-Override
|
||||||
def store_dir
|
def store_dir
|
||||||
store_dirs[object_store]
|
store_dirs[object_store]
|
||||||
|
|
5
changelogs/unreleased/fix-namespace-upload.yml
Normal file
5
changelogs/unreleased/fix-namespace-upload.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Fix workhorse temp path for namespace uploads
|
||||||
|
merge_request: 21650
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -40,6 +40,12 @@ describe NamespaceFileUploader do
|
||||||
end
|
end
|
||||||
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
|
describe "#migrate!" do
|
||||||
before do
|
before do
|
||||||
uploader.store!(fixture_file_upload(File.join('spec/fixtures/doc_sample.txt')))
|
uploader.store!(fixture_file_upload(File.join('spec/fixtures/doc_sample.txt')))
|
||||||
|
|
Loading…
Reference in a new issue