RE: [flexcoders] How to upload a file with FileReference ?? Any help please :( :(

2010-06-03 Thread Nini7016 Nini7016

First of all, thank you very very much to answer me :)

So, here i must create a class Java which uplod the file ?? isn't it ??



To: flexcoders@yahoogroups.com
From: the_bran...@yahoo.com
Date: Thu, 3 Jun 2010 01:59:51 -0700
Subject: Re: [flexcoders] How to upload a file with FileReference ?? Any help 
please :( :(


















 



  



  
  
  
I might be reading this the wrong way but in FILE_UPLOAD_ URL you should put 
the path to the server script that will save your file on the server.
C


From: Nini7016 Nini7016 
To: flexcoders@yahoogroups.com
Sent: Thu, June 3, 2010 10:29:17 AM
Subject: [flexcoders] How to upload a file with FileReference ?? Any help 
please :( :(









 




  
  
  


Hello 

In my application, i have to upload a local file and send it to a server.

There is my code : 

   private const FILE_UPLOAD_ URL:String = "http://www. 
YOUR-WEBSITE- HERE.com/ fileref/uploader .cfm";
 
   private function init():void 
{
fileRef = new FileReference( );
var textTypes:FileFilte r =
 new FileFilter(" WSDL file", "*.pdf ; *.wsdl");
xmlTypes= new Array(textTypes) ;


//the upload
fileRef.addEventLis tener(Event. SELECT, fileRef_select);
fileRef.addEventLis tener(Event. COMPLETE, 
fileRef_complete) ;

}

   
  
private function browseAndUpload():void 
{

 
 fileRef.browse(xmlTypes);
 
 
   
   
}

private function fileRef_select(evt:Event): void {
try {
fileRef.upload( new URLRequest(FILE_ UPLOAD_URL) );
 //fileRef.load 
//fileRef.save(
 );
//display the name of the file in the AreaText
forChange.text = fileRef.name;

//fill in the file in the List
myCB.dataProvider = fileRef.name;

} catch (err:Error) {
//message.text = "ERROR: zero-byte
 file";
Alert.show(" ERROR to upload the file");
}
}

When i add fileRef.load in the code that provides ERROR :( :( 
However i don't understand what should i put in the variable  FILE_UPLOAD_ URL 
??

Any idea please :( 

Thanks for your help 

;)

  

Votre vie privée l'est-elle vraiment ? Internet Explorer 8 vous protège 
gratuitement !




 








  



 









  
_
Hotmail arrive sur votre téléphone ! Compatible Iphone, Windows Phone, 
Blackberry, …
http://www.messengersurvotremobile.com/?d=Hotmail

Re: [flexcoders] How to upload a file with FileReference ?? Any help please :( :(

2010-06-03 Thread claudiu ursica
I might be reading this the wrong way but in FILE_UPLOAD_ URL you should put 
the path to the server script that will save your file on the server.
C






From: Nini7016 Nini7016 
To: flexcoders@yahoogroups.com
Sent: Thu, June 3, 2010 10:29:17 AM
Subject: [flexcoders] How to upload a file with FileReference ?? Any help 
please :( :(

   
Hello 

In my application, i have to upload a local file and send it to a server.

There is my code : 

   private const FILE_UPLOAD_ URL:String = "http://www. 
YOUR-WEBSITE- HERE.com/ fileref/uploader .cfm";
 
   private function init():void 
{
fileRef = new FileReference( );
var textTypes:FileFilte r = new FileFilter(" WSDL file", 
"*.pdf ; *.wsdl");
xmlTypes= new Array(textTypes) ;


//the upload
fileRef.addEventLis tener(Event. SELECT,fileRef_select);
fileRef.addEventLis tener(Event. COMPLETE, 
fileRef_complete) ;

}

   
  
private function browseAndUpload():void 
{

 
 fileRef.browse(xmlTypes);
 
 
  
}

private function fileRef_select(evt:Event): void {
try {
fileRef.upload( new URLRequest(FILE_ UPLOAD_URL) );
 //  fileRef.load 
//fileRef.save( );
//display the name of the file in the AreaText
forChange.text = fileRef.name;

//fill in the file in the List
myCB.dataProvider = fileRef.name;

} catch (err:Error) {
//message.text = "ERROR: zero-byte file";
Alert.show(" ERROR to upload the file");
}
}

When i add fileRef.load in the code that provides ERROR :( :( 
However i don't understand what should i put in the variable FILE_UPLOAD_ URL ??

Any idea please :( 

Thanks for your help 

;)




Votre vie privée l'est-elle vraiment ? Internet Explorer 8 vous protège 
gratuitement !