我需要通过使用rtmps协议在服务器上发送文件的flex上传服务器上的文件。
我试着在服务器上发送FileReference,请求已经执行,但是在服务器端,我只得到了空的ObjectMap。我知道我可以使用URLRequest,但我确实需要rtmps请求。
我的Flex代码:
public function uploadFile(file:FileReference):void{
NetConnection nc = new NetConnection();
nc.client = this;
nc.proxyType = "best";
nc.connect(connectionURL, "3.0", "userName", "password");
nc.call("uploadFile", null, file);
}我的Java代码:
public void uploadFile(Object param) { // <-- param is empty ObjectMap
log.info("Upload file.");
// save file on server
}有谁可以帮我?
发布于 2014-04-16 12:59:35
Java不知道如何将FileReference类映射到java等价物。在flex中,从ByteArray中获取FileReference并将其发送到服务器。Java知道如何处理字节数组。那么,您可以在服务器上随意使用它。
https://stackoverflow.com/questions/23108556
复制相似问题