Hi there,
In short :
i am running a php-script with (post)vars send from flash builder using a HTTPService. This script creates a document which is automatically downloaded to the client...
As long as i used GETvars to open a webpage to the php-script everyting works. But with POSTvars, it fails...
The php-code that generates the document wasn't changed :
header('Content-Description: File Transfer');
header("Content-type: text/csv");
header('Content-Length: ' . filesize($file));
header('Content-Disposition: attachment; filename=' . basename($file));
readfile($file);
Now when i use POSTvars, it still creates a good document, but the download doesn't work.
In the .mxml (Flash builder) i have :
<fx:Declarations>
<fx:String id="phpFile">./amfphp/services/persdb/rapport_post.php</fx:String>
<mx:HTTPService id="form1"
url="{phpFile}"
method="POST"
result="handleResult(event)"
fault="handleFault(event)"
resultFormat="text">
<mx:request>
<type>tmp</type>
<rapport>tmp</rapport>
<params>tmp</params>
</mx:request> </mx:HTTPService>
</fx:Declarations>
And my .as file contains this :
public function sendCsvForm():void{
var param:Object = new Object;
param.type = "Persoon.Rapport";
param.rapport = "CSVCode";
param.params = query3 + "~" + filterQuery + "~csvbestand";
form1.send(param);
}
Any hints on what i am doing wrong?
Thanks in advance