Fix "post from URL"

This commit is contained in:
Zixaphir 2014-04-06 20:40:54 -07:00
parent a2cacec59a
commit 382c4f8f3c
3 changed files with 3 additions and 11 deletions

View File

@ -6302,7 +6302,7 @@
return $.addClass(QR.nodes.el, 'dump'); return $.addClass(QR.nodes.el, 'dump');
}, },
handleBlob: function(urlBlob, header, url) { handleBlob: function(urlBlob, header, url) {
var blob, end, endnl, endsc, mime, name, name_end, name_start, start, _ref; var blob, end, endnl, endsc, mime, name, name_end, name_start, start;
name = url.substr(url.lastIndexOf('/') + 1, url.length); name = url.substr(url.lastIndexOf('/') + 1, url.length);
start = header.indexOf("Content-Type: ") + 14; start = header.indexOf("Content-Type: ") + 14;
endsc = header.substr(start, header.length).indexOf(";"); endsc = header.substr(start, header.length).indexOf(";");
@ -6324,9 +6324,6 @@
if (blob.type === null) { if (blob.type === null) {
return QR.error("Unsupported file type."); return QR.error("Unsupported file type.");
} }
if (_ref = blob.type, __indexOf.call(QR.mimeTypes, _ref) < 0) {
return QR.error("Unsupported file type.");
}
return QR.handleFiles([blob]); return QR.handleFiles([blob]);
}, },
handleUrl: function() { handleUrl: function() {

View File

@ -6366,7 +6366,7 @@
return $.addClass(QR.nodes.el, 'dump'); return $.addClass(QR.nodes.el, 'dump');
}, },
handleBlob: function(urlBlob, header, url) { handleBlob: function(urlBlob, header, url) {
var blob, end, endnl, endsc, mime, name, name_end, name_start, start, _ref; var blob, end, endnl, endsc, mime, name, name_end, name_start, start;
name = url.substr(url.lastIndexOf('/') + 1, url.length); name = url.substr(url.lastIndexOf('/') + 1, url.length);
start = header.indexOf("Content-Type: ") + 14; start = header.indexOf("Content-Type: ") + 14;
endsc = header.substr(start, header.length).indexOf(";"); endsc = header.substr(start, header.length).indexOf(";");
@ -6388,9 +6388,6 @@
if (blob.type === null) { if (blob.type === null) {
return QR.error("Unsupported file type."); return QR.error("Unsupported file type.");
} }
if (_ref = blob.type, __indexOf.call(QR.mimeTypes, _ref) < 0) {
return QR.error("Unsupported file type.");
}
return QR.handleFiles([blob]); return QR.handleFiles([blob]);
}, },
handleUrl: function() { handleUrl: function() {

View File

@ -308,8 +308,6 @@ QR =
return if blob.type is null return if blob.type is null
QR.error "Unsupported file type." QR.error "Unsupported file type."
return unless blob.type in QR.mimeTypes
QR.error "Unsupported file type."
QR.handleFiles([blob]) QR.handleFiles([blob])
handleUrl: -> handleUrl: ->