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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
e9c26282
Commit
e9c26282
authored
Jan 11, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if file exists in metadata in download action
parent
09a4a5af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
app/controllers/projects/artifacts_controller.rb
app/controllers/projects/artifacts_controller.rb
+8
-3
No files found.
app/controllers/projects/artifacts_controller.rb
View file @
e9c26282
...
@@ -24,9 +24,14 @@ class Projects::ArtifactsController < Projects::ApplicationController
...
@@ -24,9 +24,14 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
end
def
file
def
file
# TODO, check if file exists in metadata
file
=
build
.
artifacts_metadata_path
(
params
[
:path
])
if
file
.
exists?
render
json:
{
repository:
build
.
artifacts_file
.
path
,
render
json:
{
repository:
build
.
artifacts_file
.
path
,
path:
Base64
.
encode64
(
params
[
:path
].
to_s
)
}
path:
Base64
.
encode64
(
file
.
path
)
}
else
render
json:
{},
status:
404
end
end
end
private
private
...
...
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