Posted By

flo on 02/09/12


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

vijendramisra
joshspoon


Save ByteArray to file with PHP


 / Published in: ActionScript
 

  1. //-- your byte array you want to save
  2. var bytes: ByteArray = new ByteArray();
  3.  
  4. //-- set up correct url request using post in binary mode
  5. var request:URLRequest = new URLRequest ( 'http://pathto/save.php' );
  6. var loader: URLLoader = new URLLoader();
  7. request.contentType = 'application/octet-stream';
  8. request.method = URLRequestMethod.POST;
  9. request.data = bytes;
  10. loader.load( request );

Report this snippet  

You need to login to post a comment.