diff options
| author | taehoon <th.dev91@gmail.com> | 2019-03-04 21:22:32 -0500 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-03-04 21:22:32 -0500 |
| commit | ff9e55ae4248504345b5ee7935b084defc4cad1c (patch) | |
| tree | 3ff6b7a9b7138fabf54ca689b3227f45f194cb59 /src/components/user_settings/user_settings.js | |
| parent | 3e4d465ebab2196dcacfcae1921d7cf7d74f4a0c (diff) | |
Generate cropped avatar image in the original file type
Diffstat (limited to 'src/components/user_settings/user_settings.js')
| -rw-r--r-- | src/components/user_settings/user_settings.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index d6972737..c0ab759c 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -157,8 +157,8 @@ const UserSettings = { } reader.readAsDataURL(file) }, - submitAvatar (cropper) { - const img = cropper.getCroppedCanvas().toDataURL('image/jpeg') + submitAvatar (cropper, file) { + const img = cropper.getCroppedCanvas().toDataURL(file.type) return this.$store.state.api.backendInteractor.updateAvatar({ params: { img } }).then((user) => { if (!user.error) { this.$store.commit('addNewUsers', [user]) |
