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
Developer
VansFannel
Posts: 166
Registered: ‎03-04-2011
My Device: Playbook

Upload multi-part form with WebWorks

I'm developing a Blackberry OS 5 or greater app with WebWorks SDK.

 

I need to send a multi-part form to a web service and I don't know how to do it. I'm using jQuery on it and searching over Internet I've read that jQuery can't read image from HDD. Then, I don't know how to do it.

 

How can I send a multi-part form with WebWorks SDK?

Developer
gluth
Posts: 192
Registered: ‎09-23-2009
My Device: 9860/PlayBook/Dev Alpha
My Carrier: Plus GSM

Re: Upload multi-part form with WebWorks

Multipart is used for transfer files, and it looks like you want to transfer file - picture over the internet to your server. I'm not sure if input type="file" will be usable in webworks but suspect that it will not.

 

I would implement it in this way:

1) Use file api to get file contents as string blob (there are functions which will replace blob to string),

2) Send string in chunks, with regular post, with nice progress bar and fault checking to server,

3) Collect all parts and rebuild file on server,

Found my post helpfull? Like it! It solves your trouble? Help others and accept it as solution. Search before asking.
My apps: Secret Cod3s | Should my tablet be banned?
--
Jakub Nietrzeba
PGS Software S.A.
Your reliable partner in Poland - IT Outsourcing - BlackBerry, iPhone, Web and Standalone applications