I need to upload a large video using Flex/AIR but I'm having trouble doing so. First I thought about doing the following:
<?xml version="1.0" encoding="utf-8"?>
private function upload():void
var fl:File = File.desktopDirectory.resolvePath('S1000001.MP4');
var fs:FileStream = new FileStream();
var ba:ByteArray = new ByteArray();
private function uploadResult(e:ResultEvent):void
<s:method name="upload" result="uploadResult(event)"/>
Essentially this is automatically picking up the video "S1000001.MP4" on my desktop, converting into a ByteArray and sending via AMF to the PHP server. However the ByteArray process causes the runtime memory usage to exceed the limits, and eventually the runtime crashes. The video is only 350MB.
Rather than putting the video into a ByteArray, is it not possible to simply stream the video as a ByteArray to the server?