Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
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 @@ class NamespaceFileUploader < FileUploader
...
@@ -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
]
...
...
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 @@ describe NamespaceFileUploader do
...
@@ -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'
)))
...
...
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