wuairen created CB-11583:
----------------------------
Summary: file plugin var blob = new Blob([this.response], {type:
'image/png'}); report Uncaught TypeError: Illegal constructor
Key: CB-11583
URL: https://issues.apache.org/jira/browse/CB-11583
Project: Apache Cordova
Issue Type: Bug
Components: Plugin File
Affects Versions: 6.0.0
Environment: Samsung GT-N7100 android 4.1.1, API 16
Reporter: wuairen
var blob = new Blob([this.response], { type: 'image/png' });
When I test the below sample code, the above line code will report error as:
E/Web Console: Uncaught TypeError: Illegal constructor:175
While it works well in the emulator(which is Android 6.0, API 23).
My question: which android API version cordova file plugin support ? Where can
I find out all the platform's version which cordova's feature were expecting to
support?
code and its origins site is here:
http://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html#write-to-a-file-
function getSampleFile(dirEntry) {
var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://cordova.apache.org/static/img/cordova_bot.png', true);
xhr.responseType = 'blob';
xhr.onload = function() {
if (this.status == 200) {
var blob = new Blob([this.response], { type: 'image/png' });
saveFile(dirEntry, blob, "downloadedImage.png");
}
};
xhr.send();
}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]