Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GitLab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
projects.thm.de
GitLab
Commits
84404352
Commit
84404352
authored
Sep 10, 2018
by
Jarka Košanová
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix workhorse temp path for namespace uploads
parent
2054199b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
app/uploaders/namespace_file_uploader.rb
app/uploaders/namespace_file_uploader.rb
+4
-0
changelogs/unreleased/fix-namespace-upload.yml
changelogs/unreleased/fix-namespace-upload.yml
+5
-0
spec/uploaders/namespace_file_uploader_spec.rb
spec/uploaders/namespace_file_uploader_spec.rb
+6
-0
No files found.
app/uploaders/namespace_file_uploader.rb
View file @
84404352
...
...
@@ -21,6 +21,10 @@ def self.model_path_segment(model)
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
]
...
...
changelogs/unreleased/fix-namespace-upload.yml
0 → 100644
View file @
84404352
---
title
:
Fix workhorse temp path for namespace uploads
merge_request
:
21650
author
:
type
:
fixed
spec/uploaders/namespace_file_uploader_spec.rb
View file @
84404352
...
...
@@ -40,6 +40,12 @@
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'
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment