Commit fa6d6974 authored by lilia's avatar lilia
Browse files

Discard unsupported files

Fixes #534

// FREEBIE
parent 41357b4a
......@@ -8,6 +8,9 @@
Whisper.FileSizeToast = Whisper.ToastView.extend({
templateName: 'file-size-modal'
});
Whisper.UnsupportedFileTypeToast = Whisper.ToastView.extend({
template: "Unsupported file type"
});
Whisper.FileInputView = Backbone.View.extend({
tagName: 'span',
......@@ -115,6 +118,12 @@
this.oUrl = URL.createObjectURL(file);
this.addThumb(this.oUrl);
break;
default:
var toast = new Whisper.UnsupportedFileTypeToast();
toast.$el.insertAfter(this.$el);
toast.render();
this.deleteFiles();
break;
}
this.autoScale(file).then(function(blob) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment