Merge branch '45443-unable-to-save-user-profile-update-with-safari' into 'master'
Resolve "Unable to save user profile update with Safari" Closes #45443 See merge request gitlab-org/gitlab-ce!20676
This commit is contained in:
commit
3706707164
5 changed files with 14 additions and 1 deletions
|
@ -14,6 +14,7 @@ import 'core-js/es6/weak-map';
|
|||
|
||||
// Browser polyfills
|
||||
import 'classlist-polyfill';
|
||||
import 'formdata-polyfill';
|
||||
import './polyfills/custom_event';
|
||||
import './polyfills/element';
|
||||
import './polyfills/event';
|
||||
|
|
|
@ -49,13 +49,15 @@ export default class Profile {
|
|||
|
||||
saveForm() {
|
||||
const self = this;
|
||||
const formData = new FormData(this.form[0]);
|
||||
const formData = new FormData(this.form.get(0));
|
||||
const avatarBlob = this.avatarGlCrop.getBlob();
|
||||
|
||||
if (avatarBlob != null) {
|
||||
formData.append('user[avatar]', avatarBlob, 'avatar.png');
|
||||
}
|
||||
|
||||
formData.delete('user[avatar]-trigger');
|
||||
|
||||
axios({
|
||||
method: this.form.attr('method'),
|
||||
url: this.form.attr('action'),
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Resolve "Unable to save user profile update with Safari"
|
||||
merge_request: 20676
|
||||
author:
|
||||
type: fixed
|
|
@ -53,6 +53,7 @@
|
|||
"emoji-unicode-version": "^0.2.1",
|
||||
"exports-loader": "^0.7.0",
|
||||
"file-loader": "^1.1.11",
|
||||
"formdata-polyfill": "^3.0.11",
|
||||
"fuzzaldrin-plus": "^0.5.0",
|
||||
"glob": "^7.1.2",
|
||||
"imports-loader": "^0.8.0",
|
||||
|
|
|
@ -3211,6 +3211,10 @@ form-data@~2.3.0, form-data@~2.3.1:
|
|||
combined-stream "1.0.6"
|
||||
mime-types "^2.1.12"
|
||||
|
||||
formdata-polyfill@^3.0.11:
|
||||
version "3.0.11"
|
||||
resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-3.0.11.tgz#c82b4b4bea3356c0a6752219e54ce1edb2a7fb5b"
|
||||
|
||||
forwarded@~0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
|
||||
|
|
Loading…
Reference in a new issue