summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--model/file.go4
-rw-r--r--web/react/components/file_upload.jsx6
2 files changed, 2 insertions, 8 deletions
diff --git a/model/file.go b/model/file.go
index 3d38ddbd1..6055cbc9a 100644
--- a/model/file.go
+++ b/model/file.go
@@ -13,8 +13,8 @@ const (
)
var (
- IMAGE_EXTENSIONS = [4]string{".jpg", ".gif", ".bmp", ".png"}
- IMAGE_MIME_TYPES = map[string]string{".jpg": "image/jpeg", ".gif": "image/gif", ".bmp": "image/bmp", ".png": "image/png", ".tiff": "image/tiff"}
+ IMAGE_EXTENSIONS = [5]string{".jpg", ".jpeg", ".gif", ".bmp", ".png"}
+ IMAGE_MIME_TYPES = map[string]string{".jpg": "image/jpeg", ".jepg": "image/jpeg", ".gif": "image/gif", ".bmp": "image/bmp", ".png": "image/png", ".tiff": "image/tiff"}
)
type FileUploadResponse struct {
diff --git a/web/react/components/file_upload.jsx b/web/react/components/file_upload.jsx
index b90fa4fd3..0638e7109 100644
--- a/web/react/components/file_upload.jsx
+++ b/web/react/components/file_upload.jsx
@@ -101,9 +101,6 @@ module.exports = React.createClass({
for (var i = 0; i < items.length; i++) {
if (items[i].type.indexOf('image') !== -1) {
var ext = items[i].type.split('/')[1].toLowerCase();
- if (ext === 'jpeg') {
- ext = 'jpg';
- }
if (Constants.IMAGE_TYPES.indexOf(ext) < 0) {
continue;
@@ -124,9 +121,6 @@ module.exports = React.createClass({
var file = items[i].getAsFile();
var ext = items[i].type.split('/')[1].toLowerCase();
- if (ext === 'jpeg') {
- ext = 'jpg';
- }
if (Constants.IMAGE_TYPES.indexOf(ext) < 0) {
continue;