Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
3.2.0
-
None
-
None
Description
Filetransfer download and upload are not working in Blackberry10 (Z10) phone
we have used below api for image upload
From capture api we are taking fileuri
var options = new FileUploadOptions();
options.fileKey="images[0]";
options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
options.mimeType="image/jpeg";
ft.upload(imageURI, serverURI, win, fail, options)
It is not working.
Even download image from server also not working
Normal filetransfer.download not working. So we have tried below code that is also not working
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
var xhr = new XMLHttpRequest();
console.log("uri = "+uri);
xhr.open('GET', uri, true);
xhr.responseType = 'blob';
xhr.onload = function(e) {
console.log("xhr onload funcation e"+e);
window.requestFileSystem(PERSISTENT, 1024 * 1024 * 10, function(fs) {
console.log("fs = "+fs);
fs.root.getFile('/accounts/1000/shared/downloads/image.jpg',
, function(fileEntry) {
console.log("file entry"+fileEntry);
fileEntry.createWriter(function(writer) {
console.log("writer created");
writer.onwrite = function(e)
;
writer.onerror = function(e)
;
console.log("resp = "+xhr.response);
var blob = new Blob([xhr.response],
);
console.log("blob size is := "+blob.size);
writer.write(blob);
}, onError);
}, onError);
}, onError);
};
xhr.send();
Actually image.jpg file is created under '/accounts/1000/shared/downloads/' folder but not writing the blob cobntent into the file
Attachments
Issue Links
- is duplicated by
-
CB-4899 [Blackberry 10] / [FileTransfer plugin]: download is not binary safe
-
- Closed
-