如何使用Worklight传输媒体文件 [英] How to transfer media files using Worklight

查看:269
本文介绍了如何使用Worklight传输媒体文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Worklight Adapters传输媒体(照片或电影)的正确方法是什么?

What's the correct way of transferring media (photos or movies) using Worklight Adapters?

我通过适配器发送了一张照片并收到了错误:表单太大,超出了最大尺寸...
我看了我需要更改表单通过Jetty的大小

I sent a photo via the adapter and got the error: form too large, exceed the maximum size... I read I need to change the form size through the Jetty

但是我将部署应用程序的服务器不会是一个码头所以我做了什么shell?

谢谢!

but the server I'll deploy the app won't be a jetty so what shell i do?
Thanks!

推荐答案

请参阅主题将大型(和二进制)文件上载到Worklight适配器

基本上,Worklight没有相当于允许您传输任意大块数据的HTTP POST机制。对于大小不明的大型文件(照片,视频,音频),您需要将文件上传到Worklight适配器框架之外的服务器。例如,您只需将其发布到已配置的Web服务器即可。在我的情况下(在上面引用的答案中)我需要创建一个完整的客户端 - 服务器机制来协商端口和密钥,开始侦听该端口,然后接受请求并确保发布客户端传递密钥作为授权传输安全数据。

Basically, Worklight does not have the equivalent to an HTTP POST mechanism that allows you to transfer arbitrarily large chunked data. For large files of unknown sizes (photos, video, audio) you'll need to upload the file to the server outside the Worklight adapter framework. For example you could simply post it to a web server you have configured. In my case (in the above referenced answer) I needed to create an entire client-server mechanism to negotiate a port and key, start listening on that port, then accept requests and ensure the posting client passes the key as authorization to transfer the secure data.

希望IBM在将来的版本中为此提供正式服务。

Hopefully IBM will provide a formal service for this in a future release.

这篇关于如何使用Worklight传输媒体文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆