Save 'video/quicktime' files as .mov
Sometimes .mov files arrive with content type video/quicktime, but must be saved to .mov in order for osx to recognize them as videos and open the appropriate default program, display thumbnails, etc... // FREEBIE
This commit is contained in:
parent
a27ea20f3e
commit
c9b4ae6e80
1 changed files with 9 additions and 3 deletions
|
@ -71,7 +71,6 @@
|
||||||
|
|
||||||
var parts = this.model.contentType.split('/');
|
var parts = this.model.contentType.split('/');
|
||||||
this.contentType = parts[0];
|
this.contentType = parts[0];
|
||||||
this.fileType = parts[1];
|
|
||||||
if (options.timestamp) {
|
if (options.timestamp) {
|
||||||
this.timestamp = options.timestamp;
|
this.timestamp = options.timestamp;
|
||||||
}
|
}
|
||||||
|
@ -79,6 +78,12 @@
|
||||||
events: {
|
events: {
|
||||||
'click': 'onclick'
|
'click': 'onclick'
|
||||||
},
|
},
|
||||||
|
getFileType: function() {
|
||||||
|
switch(this.model.contentType) {
|
||||||
|
case 'video/quicktime': return 'mov';
|
||||||
|
default: return this.model.contentType.split('/')[1];
|
||||||
|
}
|
||||||
|
},
|
||||||
onclick: function(e) {
|
onclick: function(e) {
|
||||||
switch (this.contentType) {
|
switch (this.contentType) {
|
||||||
case 'image':
|
case 'image':
|
||||||
|
@ -105,8 +110,9 @@
|
||||||
if (this.timestamp) {
|
if (this.timestamp) {
|
||||||
suggestion += moment(this.timestamp).format('-YYYY-MM-DD-HHmmss');
|
suggestion += moment(this.timestamp).format('-YYYY-MM-DD-HHmmss');
|
||||||
}
|
}
|
||||||
if (this.fileType) {
|
var fileType = this.getFileType();
|
||||||
suggestion += '.' + this.fileType;
|
if (fileType) {
|
||||||
|
suggestion += '.' + fileType;
|
||||||
}
|
}
|
||||||
return suggestion;
|
return suggestion;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue