Commit 37067071 authored by Filipa Lacerda's avatar Filipa Lacerda

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
parents 623efcef 6d4f4caa
......@@ -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'),
......
---
title: Resolve "Unable to save user profile update with Safari"
merge_request: 20676
author:
type: fixed
......@@ -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"
......
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