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
91acfafc
Commit
91acfafc
authored
Feb 28, 2018
by
Micaël Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the failing spec
parent
98cc07ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
app/controllers/concerns/uploads_actions.rb
app/controllers/concerns/uploads_actions.rb
+12
-5
No files found.
app/controllers/concerns/uploads_actions.rb
View file @
91acfafc
...
...
@@ -62,20 +62,27 @@ module UploadsActions
end
def
build_uploader_from_upload
return
nil
unless
params
[
:secret
]
&&
params
[
:filename
]
return
unless
uploader
=
build_uploader
upload_paths
=
uploader_class
.
new
(
model
,
secret:
params
[
:secret
])
.
upload_paths
(
params
[
:filename
])
upload_paths
=
uploader
.
upload_paths
(
params
[
:filename
])
upload
=
Upload
.
find_by
(
uploader:
uploader_class
.
to_s
,
path:
upload_paths
)
upload
&
.
build_uploader
end
def
build_uploader_from_params
return
unless
uploader
=
build_uploader
uploader
.
retrieve_from_store!
(
params
[
:filename
])
uploader
end
def
build_uploader
return
unless
params
[
:secret
]
&&
params
[
:filename
]
uploader
=
uploader_class
.
new
(
model
,
secret:
params
[
:secret
])
return
nil
unless
uploader
.
model_valid?
return
unless
uploader
.
model_valid?
uploader
.
retrieve_from_store!
(
params
[
:filename
])
uploader
end
...
...
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