Uploading large files with Flash: split the ByteArray
I recently came across a project that required the upload of large files on a remote server.
Because the binary file was generated directly within the application, I could not use FileReference and its upload() method.
Unfortunately, while using the URLLoader, one cannot monitor the ProgressEvent as it wont be fired.
The easiest way to solve this issue is to split the binary file and to upload it in pieces.
You will not be able to monitor the progress, but you can update a progress bar when the upload of each chunk is completed.
It will also solve problems related to the max_file_size upload.
I could not find any resource online, so I decided to share mine.
You can download a zip with the source files (php + as) here.