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: 2
Registered: ‎04-24-2011
My Device: Playbook
My Carrier: NA

Uploading a file in an HTML form from within a PlayBook WebWorks app

I'm developing an app that takes an image the user selects from their existing camera pictures and uploads it to another server.

 

It seems that any file selected from the file chooser (in an <input type='file'>) field, when uploaded, has no data within it. It works successfully from the playbook web browser, but from within the webworks app, it doesn't work. Depending on how the upload is performed (straight html, ajax), I either get a 411 error (length required) or a "file is empty" error.

 

 Has anyone else had this problem / is this a known problem? The form this is uploaded from is pretty deep in my app, but if need be, I can create a sample app that exhibits this problem.

 

 

I'm building this with the webworks 2.0 SDK and testing on a 16GB Playbook. Thanks.

Contributor
Posts: 34
Registered: ‎03-15-2011
My Device: Torch 9800
My Carrier: Virgin Canada

Re: Uploading a file in an HTML form from within a PlayBook WebWorks app

Have you properly given the app access to that server in the config.xml file?
New Contributor
Posts: 2
Registered: ‎04-24-2011
My Device: Playbook
My Carrier: NA

Re: Uploading a file in an HTML form from within a PlayBook WebWorks app

[ Edited ]

I believe so.

 

In my config file I have  <access subdomains="true" uri="*"/>, and I'm able to successfully get/post everything but files.

 

 

Highlighted
New Developer
Posts: 6
Registered: ‎12-11-2008
My Device: Not Specified

Re: Uploading a file in an HTML form from within a PlayBook WebWorks app

In the blackberry-tablet.xml add the below permission

 

<permission>access_shared</permission>