summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2016-01-11 15:34:29 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2016-01-11 15:34:29 +0100
commita30377c6f1415a863bd40d1876e3cf4c46bb9f5d (patch)
tree338a7ae15e34d4ae65adb2717f53998e12b58f34 /lib/api/projects.rb
parent4e70f2519bba83d5f9d6fd0bed80e9837e8b5fc5 (diff)
parent1ede18bfa84a47ade94a0fe1acd246233db02693 (diff)
downloadgitlab-ce-a30377c6f1415a863bd40d1876e3cf4c46bb9f5d.tar.gz
Merge branch 'master' into ci/api-builds
* master: (143 commits) Only load autocomplete data when actually needed Check for current user Add pencil icon to edit group settings Issue #5817 wording of the web hooks updated on issue and merge events use JavaScript instead of CoffeeScript in Views, the reason #9819 Before project save ensure that a runners_token exists Fix Error 500 when visiting build page of project with nil runners_token Remove outdated gitlab-git-http-server reference from Install doc Fix typo in build page of projects Update docs for shared runner default settings Disable "Already Blocked" button in admin abuse report page Add CHANGELOG entry for reply-by-email fix Use WOFF versions of SourceSansPro Clean up document on adding users to a project Refactor ZenMode Fix caching issue where build status was not updating in project dashboard Add a CHANGELOG entry for The Most Important Feature of All Time(TM) changes verb `references` to noun `reference`. fixes new branch button positioning, when visible and not visible container DRY up upload and download services ...
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 0781236cf6d..8b1390e3289 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -269,7 +269,7 @@ module API
# Remove a forked_from relationship
#
# Parameters:
- # id: (required) - The ID of the project being marked as a fork
+ # id: (required) - The ID of the project being marked as a fork
# Example Request:
# DELETE /projects/:id/fork
delete ":id/fork" do
@@ -278,6 +278,16 @@ module API
user_project.forked_project_link.destroy
end
end
+
+ # Upload a file
+ #
+ # Parameters:
+ # id: (required) - The ID of the project
+ # file: (required) - The file to be uploaded
+ post ":id/uploads" do
+ ::Projects::UploadService.new(user_project, params[:file]).execute
+ end
+
# search for projects current_user has access to
#
# Parameters: