I managed to fix this by changing the web service to accept base64Binary. If anyone is interested, here is the php to do this, using the nusoap PEAR extension.
Register the service
"bytes" => "xsd:base64Binary",
"cp_id" => "xsd:string", "filename" => "xsd:string"
array("return" => "xsd:boolean"),
"Upload a File"
Implement the service
function UploadFile($bytes, $folder_path, $filename)
$file_path = $path_to_html.$folder_path."/".$filename;
$fp = fopen($file_path, "w");
if( is_array($bytes) )
foreach($bytes as $k => $v)
I have posted this code in case it helps someone else although I am still not sure how to convert a ByteArray to an ArrayCollection in Flex.