Add filename
This commit is contained in:
parent
15d8da033a
commit
a439ecf4f2
@ -5695,6 +5695,7 @@
|
||||
if (_ref = urlBlob.type, __indexOf.call(QR.mimeTypes, _ref) < 0) {
|
||||
QR.error("Unsupported file type.");
|
||||
}
|
||||
urlBlob.name = url.substr(url.lastIndexOf('/') + 1, url.length);
|
||||
QR.handleFiles([urlBlob]);
|
||||
return;
|
||||
return {
|
||||
|
||||
BIN
builds/crx.crx
BIN
builds/crx.crx
Binary file not shown.
@ -5696,6 +5696,7 @@
|
||||
if (_ref = urlBlob.type, __indexOf.call(QR.mimeTypes, _ref) < 0) {
|
||||
QR.error("Unsupported file type.");
|
||||
}
|
||||
urlBlob.name = url.substr(url.lastIndexOf('/') + 1, url.length);
|
||||
QR.handleFiles([urlBlob]);
|
||||
} else {
|
||||
QR.error("Can't load image.");
|
||||
|
||||
@ -276,11 +276,12 @@ QR =
|
||||
xhr.open('GET', url, true)
|
||||
xhr.responseType = 'blob'
|
||||
xhr.onload = (e) ->
|
||||
if this.readyState == this.DONE && xhr.status == 200
|
||||
if @readyState is @DONE && xhr.status is 200
|
||||
urlBlob = new Blob([this.response], {type : this.getResponseHeader('content-type')})
|
||||
return if urlBlob.type == null
|
||||
unless urlBlob.type in QR.mimeTypes
|
||||
QR.error "Unsupported file type."
|
||||
urlBlob.name = url.substr(url.lastIndexOf('/')+1, url.length)
|
||||
QR.handleFiles([urlBlob])
|
||||
return
|
||||
else
|
||||
@ -318,6 +319,7 @@ QR =
|
||||
unless urlBlob.type in QR.mimeTypes
|
||||
QR.error "Unsupported file type."
|
||||
|
||||
urlBlob.name = url.substr(url.lastIndexOf('/')+1, url.length)
|
||||
QR.handleFiles([urlBlob])
|
||||
return
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user