Skip to content

Commit

Permalink
アバター/バナー アップロードでも forced upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Apr 12, 2019
1 parent fd13d24 commit 1590c6f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/client/app/common/views/components/settings/profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export default Vue.extend({
const data = new FormData();
data.append('file', file);
data.append('i', this.$store.state.i.token);
data.append('force', 'true');
fetch(apiUrl + '/drive/files/create', {
method: 'POST',
Expand All @@ -219,6 +220,7 @@ export default Vue.extend({
const data = new FormData();
data.append('file', file);
data.append('i', this.$store.state.i.token);
data.append('force', 'true');
fetch(apiUrl + '/drive/files/create', {
method: 'POST',
Expand Down
1 change: 0 additions & 1 deletion src/client/app/common/views/components/uploader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import Vue from 'vue';
import i18n from '../../../i18n';
import { apiUrl } from '../../../config';
import getMD5 from '../../scripts/get-md5';
export default Vue.extend({
i18n: i18n('common/views/components/uploader.vue'),
Expand Down
1 change: 1 addition & 0 deletions src/client/app/desktop/api/update-avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default ($root: any) => {
w.$once('cropped', blob => {
const data = new FormData();
data.append('i', $root.$store.state.i.token);
data.append('force', 'true');
data.append('file', blob, file.name + '.cropped.png');

$root.api('drive/folders/find', {
Expand Down
1 change: 1 addition & 0 deletions src/client/app/desktop/api/update-banner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default ($root: any) => {
w.$once('cropped', blob => {
const data = new FormData();
data.append('i', $root.$store.state.i.token);
data.append('force', 'true');
data.append('file', blob, file.name + '.cropped.png');

$root.api('drive/folders/find', {
Expand Down

0 comments on commit 1590c6f

Please sign in to comment.