Charles has a demo version that is fully functional but will exit after 30 
minutes. Charles is invaluable for tracking down network issues. It has paid 
for itself many times over for me.

The only thing that may be wrong that I can see is the value of HOST.

I would put a breakpoint in your try block and check to see that the 
filereference and URLRequest is setup correctly.

Also, you may want to download a file upload component and try that (That is 
what I did). These components have been tested and known to work. They also add 
extra functionality like progress bars etc so you don't have to re-invent the 
wheel.

--- In flexcoders@yahoogroups.com, David Pariente <xxmapach...@...> wrote:
>
> I get all alerts but the one of the catch error.
> 
> i dont get any warning or errors.
> 
> at first the try/catcch was inside the subeArchivo function...but i moved it 
> to the object itself for test and leave code more clear for me. same result.
> 
> i didn't try charles (commercial, and don't think i could install it here) 
> but tryied with httpfox and i can't see the call to the php file when click 
> upload. (I see any other communication).
> 
> thnks for the help...i continued trying but still have no hint...:(
> 
> 
> 
> 
> 
> 
> ________________________________
> De: valdhor <valdhorli...@...>
> Para: flexcoders@yahoogroups.com
> Enviado: mié,16 junio, 2010 14:47
> Asunto: [flexcoders] Re: flex3 upload function seems not calling the php 
> script
> 
>    
> 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 <xxmapachexx@> 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