Save ByteArray to file with PHP


/ Published in: ActionScript
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.