What alerts actually show?
Does the try block produce an error? If so, what error?
What happens if you include the try block inside the subeArchivo function 
rather than using getChildByName?
What does Charles (http://www.charlesproxy.com) show?





--- In flexcoders@yahoogroups.com, David Pariente <xxmapach...@...> wrote:
>
> Hi all,
> 
> I have a website with an upload code that stopped to work...if ever did 
> (thought this was tested).
> 
> After checking for maaaaany hours i still can't find a reason why is not 
> working, or stopped to.
> 
> I checked with httpFox, and looks like the php file is never called...so i 
> wonder if the upload(request) is not being called, and why...:(
> 
> this is an extract of the upload function:
> 
> public function subeArchivo(fm_id:Number, filename:String):void
>     {
>         var request:URLRequest=new URLRequest(HOST + 
> "/php/collection/collection_image_upload.php");
>         var params:URLVariables= new URLVariables();
>   
>             request.method = URLRequestMethod.POST;
>             
>             if (fm_id==1){
>                 params.folderbase="album";
>             }
>             if (fm_id==2){
>                 
>                 params.folderbase="product";
>             }
>             
>             params.web=this.web;
>             params.photo=filename;
>             
>             request.data = params;
>             
>             fm_saving_load();
>         
>         
>             //Alert.show("filename: "+request.data);
>             (this.getChildByName("fm_image_upload") as 
> form_Image_Upload).uploadfile(request);
>         
>     }
> 
> and this is the function called in the fm_image_upload form:
> 
> 
> [Bindable] public var thefile:FileReference = new FileReference();
>         
>         public function uploadfile(request:URLRequest):void{
>             
>             
>             try
>             {
>                 this.thefile.upload(request);
>             }
>             catch (error:Error)
>             {
>                 trace("Unable to upload file.");
>                 Alert.show("Unable to upload file");
>             }
> 
>             Alert.show("uploading: "+request.data);
>             Alert.show("url: "+request);
>             
>         }
> 
> This is all the code invloved. I can't manage the php to do anything i ask it 
> to do, and then after using httpfox i noticed there is no call to the php 
> file.
> The alerts show perfectly, so the uploadfile function is executing, and the 
> request data seems correct.
> 
> If someone could bring some light into this...i didn't worked in this code 
> for a year, and can't find a hint of what's wrong about it :(
> Thank you very much!
>


Reply via email to