问题
I am trying to send a base64 image via Worklight adapter.
I want to know which parameters size can the adapter handle?
Can I use a 8MB Image and convert it to base64 (let's say it will become 12 Mega Byte on 1 parameter), and then send it successfully to worklight adapter? or there is a length limit for the adapter parameters?
回答1:
Basically, there shouldn't be any limitation.
But... I think you need to re-think why you would want to send a 12mb-sized image to your app (to the device, actually).
- Load time-wise it will be slow and create a bottleneck
- I don't know your scenario, but why not send a link to the image and load that?
- Why not use Cordova File API for file transfer (which is more correct, because adapters were not meant for data transfer like this - instead you can use File API + a servlet that will talk with the database)
来源:https://stackoverflow.com/questions/23733229/ibm-worklight-6-1-adapter-parameters-size-limit