Commit 362b0cd8 authored by David Fernandez's avatar David Fernandez Committed by Kerri Miller

Enable the new multipart handler by default

Update the related documentation
parent b368a207
...@@ -4,4 +4,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33277 ...@@ -4,4 +4,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33277
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/233895 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/233895
group: group::package group: group::package
type: development type: development
default_enabled: false default_enabled: true
...@@ -2,6 +2,35 @@ ...@@ -2,6 +2,35 @@
Uploads represent all user data that may be sent to GitLab as a single file. As an example, avatars and notes' attachments are uploads. Uploads are integral to GitLab functionality, and therefore cannot be disabled. Uploads represent all user data that may be sent to GitLab as a single file. As an example, avatars and notes' attachments are uploads. Uploads are integral to GitLab functionality, and therefore cannot be disabled.
## Upload parameters
> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/214785) in GitLab 13.5.
> - It's [deployed behind a feature flag](../user/feature_flags.md), enabled by default.
> - It's enabled on GitLab.com.
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to disable it. **(CORE ONLY)**
In 13.5 and later, upload parameters are passed [between Workhorse and GitLab Rails](../development/architecture.md#simplified-component-overview) differently than they
were before.
This change is deployed behind a feature flag that is **enabled by default**.
If you experience any issues with upload,
[GitLab administrators with access to the GitLab Rails console](./feature_flags.md)
can opt to disable it.
To enable it:
```ruby
Feature.enable(:upload_middleware_jwt_params_handler)
```
To disable it:
```ruby
Feature.disable(:upload_middleware_jwt_params_handler)
```
## Using local storage ## Using local storage
NOTE: **Note:** NOTE: **Note:**
......
...@@ -229,7 +229,7 @@ module Gitlab ...@@ -229,7 +229,7 @@ module Gitlab
private private
def handler_class def handler_class
if Feature.enabled?(:upload_middleware_jwt_params_handler) if Feature.enabled?(:upload_middleware_jwt_params_handler, default_enabled: true)
::Gitlab::Middleware::Multipart::HandlerForJWTParams ::Gitlab::Middleware::Multipart::HandlerForJWTParams
else else
::Gitlab::Middleware::Multipart::Handler ::Gitlab::Middleware::Multipart::Handler
......
...@@ -31,7 +31,7 @@ module MultipartHelpers ...@@ -31,7 +31,7 @@ module MultipartHelpers
raise ArgumentError, "can't handle #{mode} mode" raise ArgumentError, "can't handle #{mode} mode"
end end
return result if ::Feature.disabled?(:upload_middleware_jwt_params_handler) return result if ::Feature.disabled?(:upload_middleware_jwt_params_handler, default_enabled: true)
# the HandlerForJWTParams expects a jwt token with the upload parameters # the HandlerForJWTParams expects a jwt token with the upload parameters
# *without* the "#{key}." prefix # *without* the "#{key}." prefix
......
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