Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
Posts: 12
Registered: ‎05-21-2012
My Device: Torch 9810
Accepted Solution

Unable to write to the fileSystem on BlackBerry 10

Hi,

 

I'm trying to write a text file to the file system on my BlackBery 10 DevAlphaB device.

 

When I do, I get an onwriteerror occuring.

 

{"type":"error","bubbles":false,"cancelBubble":false,"cancelable":false,"lengthComputable":false,"loaded":0,"total":0,"target":{"fileName":"filesystem:local:///persistent/myfolder/myfile.json","length":0,"position":0,"readyState":2,"result":null,"error":{"code":10},"onwritestart":null,"onprogress":null,"onwrite":null,"onabort":null}}

 

Error code 10 is Quote Exceeded but the text I'm trying to save is <256 "bytes" long.

 

Does anyone have any idea what I'm doing wrong?

Contributor
Posts: 12
Registered: ‎05-21-2012
My Device: Torch 9810

Re: Unable to write to the fileSystem on BlackBerry 10

[ Edited ]

Isn't it always the way...
You spend ages looking at something, post a question in the forum and then find the answer yourself.

It turns out I'd copied an old bit of code which set the size of my file space to "0" in the call to requestFileSystem.

I've changed that to 1024*1024 and lo-and-behold its working.