From 882d829558c162bf11249e5899096ef5fffdf762 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 18 Feb 2019 19:22:10 +0900 Subject: [PATCH] Fix #4063 --- src/client/app/desktop/api/update-avatar.ts | 10 ---------- src/client/app/desktop/api/update-banner.ts | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/src/client/app/desktop/api/update-avatar.ts b/src/client/app/desktop/api/update-avatar.ts index ff3d4dccfc..be332ab16c 100644 --- a/src/client/app/desktop/api/update-avatar.ts +++ b/src/client/app/desktop/api/update-avatar.ts @@ -5,16 +5,6 @@ import ProgressDialog from '../views/components/progress-dialog.vue'; export default ($root: any) => { const cropImage = file => new Promise((resolve, reject) => { - - const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$'); - if (!regex.test(file.name) ) { - $root.dialog({ - title: locale['desktop']['invalid-filetype'], - text: null - }); - return reject('invalid-filetype'); - } - const w = $root.new(CropWindow, { image: file, title: locale['desktop']['avatar-crop-title'], diff --git a/src/client/app/desktop/api/update-banner.ts b/src/client/app/desktop/api/update-banner.ts index 3b2cf113be..50f1b5fe83 100644 --- a/src/client/app/desktop/api/update-banner.ts +++ b/src/client/app/desktop/api/update-banner.ts @@ -5,16 +5,6 @@ import ProgressDialog from '../views/components/progress-dialog.vue'; export default ($root: any) => { const cropImage = file => new Promise((resolve, reject) => { - - const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$'); - if (!regex.test(file.name) ) { - $root.dialog({ - title: locale['desktop']['invalid-filetype'], - text: null - }); - return reject('invalid-filetype'); - } - const w = $root.new(CropWindow, { image: file, title: locale['desktop']['banner-crop-title'],