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

New Developer
Posts: 17
Registered: ‎01-08-2013
My Device: Playbook
My Carrier: wifi

any sample to demonstrate creating file using html5/javascript

Hi everyone,

    I was wondering if anyone can share a sample code for storing dynamically generated image (like in photo gallery) on the local device.
 I am dynamically generating png of canvas and need to store it the document/photo gallery of playbook/BB10. The application is purely html5.


Your help is truly appreciated.





Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: any sample to demonstrate creating file using html5/javascript


On BB10 you can do the following:


A) Store the file in the bar using the local protocol local:///

B) Store the file under the shared photos directory using the blackberry.io.shared filepath


For both cases WebWorks supports the HTML file API at the following links:


BB10 example storing a file into a shared directory: https://developer.blackberry.com/html5/apis/blackberry.io.html

Playbook example code and API: https://developer.blackberry.com/html5/api/blackberry.io.file.html