summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorAlessio Caiazza <acaiazza@gitlab.com>2019-09-10 16:24:10 +0000
committerRémy Coutable <remy@rymai.me>2019-09-10 16:24:10 +0000
commitdaf7810e2ee323e39e3cc0b1c6f3fe15a9977a14 (patch)
treead30eb329787116653940d22a95cad1e99ebb0ab /lib/api/projects.rb
parent0078ea44c292cd0e5eb7f4ae52358087c8ee34db (diff)
downloadgitlab-ce-daf7810e2ee323e39e3cc0b1c6f3fe15a9977a14.tar.gz
Add Scalability/FileUploads cop
This cop prevents you from using file in API, it points you to the development documentation about workhorse file acceleration.
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 3073c14b341..63bfa8db61c 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -478,7 +478,8 @@ module API
desc 'Upload a file'
params do
- requires :file, type: File, desc: 'The file to be uploaded'
+ # TODO: remove rubocop disable - https://gitlab.com/gitlab-org/gitlab-ee/issues/14960
+ requires :file, type: File, desc: 'The file to be uploaded' # rubocop:disable Scalability/FileUploads
end
post ":id/uploads" do
UploadService.new(user_project, params[:file]).execute.to_h