Treat tiffs like unrecognized files; Chrome doesn't render them (#1901)
This commit is contained in:
parent
5caee59921
commit
7781f8fa5b
2 changed files with 8 additions and 2 deletions
|
@ -130,7 +130,8 @@
|
||||||
return this.model.contentType.startsWith('video/');
|
return this.model.contentType.startsWith('video/');
|
||||||
},
|
},
|
||||||
isImage: function() {
|
isImage: function() {
|
||||||
return this.model.contentType.startsWith('image/');
|
var type = this.model.contentType;
|
||||||
|
return type.startsWith('image/') && type !== 'image/tiff';
|
||||||
},
|
},
|
||||||
mediaType: function() {
|
mediaType: function() {
|
||||||
if (this.isVoiceMessage()) {
|
if (this.isVoiceMessage()) {
|
||||||
|
|
|
@ -70,7 +70,9 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
autoScale: function(file) {
|
autoScale: function(file) {
|
||||||
if (file.type.split('/')[0] !== 'image' || file.type === 'image/gif') {
|
if (file.type.split('/')[0] !== 'image'
|
||||||
|
|| file.type === 'image/gif'
|
||||||
|
|| file.type === 'image/tiff') {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
return Promise.resolve(file);
|
return Promise.resolve(file);
|
||||||
}
|
}
|
||||||
|
@ -123,6 +125,9 @@
|
||||||
if (!file) { return; }
|
if (!file) { return; }
|
||||||
|
|
||||||
var type = file.type.split('/')[0];
|
var type = file.type.split('/')[0];
|
||||||
|
if (file.type === 'image/tiff') {
|
||||||
|
type = 'file';
|
||||||
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'audio': this.addThumb('images/audio.svg'); break;
|
case 'audio': this.addThumb('images/audio.svg'); break;
|
||||||
case 'video': this.addThumb('images/video.svg'); break;
|
case 'video': this.addThumb('images/video.svg'); break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue