Backports the EE changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/11264
Attach a file by drag & drop or click to upload