08-01-2012 10:11 AM
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?
08-01-2012 05:03 PM
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,