summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-06-26 15:36:23 +0000
committerMike Greiling <mike@pixelcog.com>2018-06-26 15:36:23 +0000
commit1b592f8c35062e50581cc49ff0e3bb28f50d4ef5 (patch)
treed488a5afd493adad8fc8025c985f4ef292390560
parent0a73f6466aab01a7ea4f119c4a457fd79c5126c8 (diff)
parent3f4a54b698aa75cd6072e49d9adee453d293e4cc (diff)
downloadgitlab-ce-1b592f8c35062e50581cc49ff0e3bb28f50d4ef5.tar.gz
Merge branch 'avatar-upload' into 'master'
Bugfix for #48378 - Resetting value of input element to fix Chrome-specific issue See merge request gitlab-org/gitlab-ce!20161
-rw-r--r--app/assets/javascripts/profile/gl_crop.js3
-rw-r--r--changelogs/unreleased/48378-avatar-upload.yml5
2 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/profile/gl_crop.js b/app/assets/javascripts/profile/gl_crop.js
index cc9ded789db..f641b23e519 100644
--- a/app/assets/javascripts/profile/gl_crop.js
+++ b/app/assets/javascripts/profile/gl_crop.js
@@ -47,7 +47,8 @@ import _ from 'underscore';
var _this;
_this = this;
this.fileInput.on('change', function(e) {
- return _this.onFileInputChange(e, this);
+ _this.onFileInputChange(e, this);
+ this.value = null;
});
this.pickImageEl.on('click', this.onPickImageClick);
this.modalCrop.on('shown.bs.modal', this.onModalShow);
diff --git a/changelogs/unreleased/48378-avatar-upload.yml b/changelogs/unreleased/48378-avatar-upload.yml
new file mode 100644
index 00000000000..1e359ee72d5
--- /dev/null
+++ b/changelogs/unreleased/48378-avatar-upload.yml
@@ -0,0 +1,5 @@
+---
+title: Fixes issue with uploading same image to Profile Avatar twice
+merge_request: 20161
+author: Chirag Bhatia
+type: fixed