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
New Contributor
Posts: 8
Registered: ‎09-27-2012
My Device: Dev Alpha
My Carrier: fido

HTML5 DirectoryEntry

[ Edited ]

Before the latest updates, I could read and write to a file on my Dev Alpha by requesting the filesystem, unsandboxing it, then using the line 

 

fs.root.getFile(blackberry.io.sharedFolder + fileName, {create: true}, function (fileEntry) { ... }

 

to create a file.  After the updates though, I get the error "SECURITY_ERR" on that line.  In the HTML5 directoryEntry API, it says I don't need anything in my config.xml for this, but is that true? Is that the problem, or is it something else?  p.s. I do have <rim: permit>access_shared</rim: permit> in the config.xml, but that's only for unsandboxing.

Retired
Posts: 5
Registered: ‎07-26-2011
My Device: 9800
My Carrier: Rogers

Re: HTML5 DirectoryEntry

Hello,

 

Are you sure the file system is really unsandboxed when you run that line?

 

Can you send me your app? (rtse@rim.com) I can quickly test it out.

 

Thanks,

Rosa

New Contributor
Posts: 8
Registered: ‎09-27-2012
My Device: Dev Alpha
My Carrier: fido

Re: HTML5 DirectoryEntry

I had it sandboxed before and I had the same issue. I just unsandboxed it so I can see if anything is happening, and to test reading files. I'll send it over to you right now
New Member
Posts: 1
Registered: ‎04-09-2012
My Device: BlackBerry 9900
My Carrier: T-Mobile.pl

Re: HTML5 DirectoryEntry

As I read in GitHub issue https://github.com/blackberry/BB10-WebWorks-Framework/issues/281 this is related to accessing filesystem from the file other than main file (index.html).

 

Is there a way to access filesystem from another view in my app? Will it be permited?

New Contributor
Posts: 8
Registered: ‎09-27-2012
My Device: Dev Alpha
My Carrier: fido

Re: HTML5 DirectoryEntry

you're almost right,  this is related to accessing filesystem from the page other than main page, not just file.  I'm not too sure if this has been fixed yet with the new releases since this problem came up, but one way to get around it, if's possible for you, is to use HTML5 localstorage. If that doesn't work for you and you're not too far into your project, maybe try switching to BBUI instead, I didn't run into any file system issues using that.