推ByteArray的POST [英] Pushing ByteArray to POST

查看:161
本文介绍了推ByteArray的POST的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个录音的ByteArray。 我想提出发送这是一个文件的POST请求。

I have a ByteArray of a sound recording. I would like to make a POST request that sends this as a file.

我能做到这一点,而无需用户保存文件,因为我只能看到FileReference.upload的一种方式将文件发送到POST,我不知道如何从一个ByteArray中做出的FileReference。谢谢你。

Can I do this without having the user save the file because I can only see FileReference.upload as a way to send files to POST and I don't know how to make a FileReference from a ByteArray. Thanks.

布兰登

推荐答案

是的,你可以使用URLLoader和设置其格式<一个href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html#!flash/net/URLLoaderDataFormat.html#BINARY"相对=nofollow>二进制,那么你可以把字节组到请求对象的数据属性。

Yes, you can, use URLLoader and set it's format to binary, then you can put the bytearray into data property of request object.

这篇关于推ByteArray的POST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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