Uploading large (and binary) files to Worklight adapter

前端 未结 1 475
谎友^
谎友^ 2020-12-20 07:28

We\'re doing a lot of work with large images and long audio files on hybrid apps using Worklight. I see that I can adjust the max file setting for calls to the adapter, but

相关标签:
1条回答
  • 2020-12-20 07:58

    First, let me say that this should be considered as a feature request for the Worklight team. Our solution is not ideal.

    Using JMS is probably the best solution I see. However, we're not able to use JMS in our implementation right now, so I had to do something else.

    We solved this by using Cordova fileUpload APIs and communicating to a custom build listener via SSL on the backend. We make a call to an adapter to get a shared secret key and a secret port number for the communications. We then using the Cordova APIs to make an SSL call to that port number, with the specified key and the connection closes after the transfer.

    I'm concerned about large scale performance of this process and unintended security holes, but so far it's working for our purposes. Hopefully soon, there will be a better way to make large file transfers to the adapter.

    0 讨论(0)
提交回复
热议问题