这里我将录制的声音上传到服务器,但我需要添加文件名和上传文件的用户名。但我不知道如何使用二进制数据发布额外的名称值对?
function onClick(e:MouseEvent)
{
var sba:ByteArray = mp3Encoder.mp3Data;
var req:URLRequest = new URLRequest(URL);
req.contentType = 'application/octet-stream';
req.method = URLRequestMethod.POST;
req.data = sba;
var loader:URLLoader = new URLLoader();
loader.addEventListener( ProgressEvent.PROGRESS, progressHandler );
loader.addEventListener( Event.COMPLETE, completeHandler );
loader.load( req );
}