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('/');
|
||||
this.contentType = parts[0];
|
||||
this.fileType = parts[1];
|
||||
if (options.timestamp) {
|
||||
this.timestamp = options.timestamp;
|
||||
}
|
||||
|
@ -79,6 +78,12 @@
|
|||
events: {
|
||||
'click': 'onclick'
|
||||
},
|
||||
getFileType: function() {
|
||||
switch(this.model.contentType) {
|
||||
case 'video/quicktime': return 'mov';
|
||||
default: return this.model.contentType.split('/')[1];
|
||||
}
|
||||
},
|
||||
onclick: function(e) {
|
||||
switch (this.contentType) {
|
||||
case 'image':
|
||||
|
@ -105,8 +110,9 @@
|
|||
if (this.timestamp) {
|
||||
suggestion += moment(this.timestamp).format('-YYYY-MM-DD-HHmmss');
|
||||
}
|
||||
if (this.fileType) {
|
||||
suggestion += '.' + this.fileType;
|
||||
var fileType = this.getFileType();
|
||||
if (fileType) {
|
||||
suggestion += '.' + fileType;
|
||||
}
|
||||
return suggestion;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue