Commit 41b74fd2 authored by Alessio Caiazza's avatar Alessio Caiazza

Merge branch '249527-properly-document-multipart-TODO-items' into 'master'

Properly document multipart/uploaded_file TODOs

See merge request gitlab-org/gitlab!43519
parents db258ca1 cfa3a20c
...@@ -137,6 +137,7 @@ module Gitlab ...@@ -137,6 +137,7 @@ module Gitlab
# TODO this class is meant to replace Handler when the feature flag # TODO this class is meant to replace Handler when the feature flag
# upload_middleware_jwt_params_handler is removed # upload_middleware_jwt_params_handler is removed
# See https://gitlab.com/gitlab-org/gitlab/-/issues/233895#roll-out-steps
class HandlerForJWTParams < Handler class HandlerForJWTParams < Handler
def with_open_files def with_open_files
@rewritten_fields.keys.each do |field| @rewritten_fields.keys.each do |field|
......
...@@ -42,6 +42,9 @@ class UploadedFile ...@@ -42,6 +42,9 @@ class UploadedFile
@remote_id = remote_id @remote_id = remote_id
end end
# TODO this function is meant to replace .from_params when the feature flag
# upload_middleware_jwt_params_handler is removed
# See https://gitlab.com/gitlab-org/gitlab/-/issues/233895#roll-out-steps
def self.from_params_without_field(params, upload_paths) def self.from_params_without_field(params, upload_paths)
path = params['path'] path = params['path']
remote_id = params['remote_id'] remote_id = params['remote_id']
...@@ -68,6 +71,10 @@ class UploadedFile ...@@ -68,6 +71,10 @@ class UploadedFile
) )
end end
# Deprecated. Don't use it.
# .from_params_without_field will replace this one
# See .from_params_without_field and
# https://gitlab.com/gitlab-org/gitlab/-/issues/233895#roll-out-steps
def self.from_params(params, field, upload_paths, path_override = nil) def self.from_params(params, field, upload_paths, path_override = nil)
path = path_override || params["#{field}.path"] path = path_override || params["#{field}.path"]
remote_id = params["#{field}.remote_id"] remote_id = params["#{field}.remote_id"]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment