Hey Mayur,

There are issues with scope of FileReference. May be this correction
will help.
http://kb.adobe.com/selfservice/viewContent.do?externalId=3637d5c3&sliceId=1

Tushar
http://tush.wordpress.com

On Nov 5, 4:56 pm, mayur khan <[EMAIL PROTECTED]> wrote:
> hi,
> I'm trying to upload a file to sharepoint site, i tried the following
> code,
> it asked me to pick some file. i did,
> its asking my LDAP credentials to access that sharepoint site, i've
> given;
> but it's not uploading; the entire application is not responding (IE
> hanged), and not responding for closing also. i'm forcing iexplore
> process to close the application.
> i could not understand this behavior, can anyone help me out in this
> regard?
>
> (I have full permission in that sharepoint site!)
>
> public function fileUpload():void
>         {
>                 var fileRef:FileReference = new FileReference();
>                 fileRef.addEventListener(Event.SELECT, selectHandler);
>                 fileRef.addEventListener(Event.COMPLETE, completeHandler);
>                 fileRef.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
> securityEvent);
>                 fileRef.addEventListener(HTTPStatusEvent.HTTP_STATUS,
> httpStatusHandler);
>                 fileRef.addEventListener(ProgressEvent.PROGRESS, 
> progressHandler);
>                 fileRef.addEventListener(IOErrorEvent.IO_ERROR, IOhandler);
>                 fileRef.addEventListener(Event.ACTIVATE, activateHandler);
>                 fileRef.addEventListener(Event.CANCEL, cancelHandler);
>                 try
>                 {
>                     var success:Boolean = fileRef.browse();
>
>                 }
>                 catch (error:Error)
>                 {
>                     //trace("Unable to browse for files.");
>                     Alert.show("Unable to browse for files.");
>                 }
>                 function selectHandler(event:Event):void
>                 {
>
>                     var request:URLRequest = new 
> URLRequest("http://SSP12NTbox:5555/
> sites/GMSL/Shared Documents/");
>                     try {
>                         fileRef.upload(request);
>                     } catch (error:Error) {
>                         //trace("Unable to upload file.");
>                         Alert.show(error.message.toString());
>                     }
>                 }
>                 function completeHandler(event:Event):void
>                 {
>                     //trace("uploaded");
>                     Alert.show("Uploaded");
>                 }
>                 function securityEvent(event:Event):void
>                 {
>                         Alert.show(event.toString());
>                 }
>                 function httpStatusHandler(event:HTTPStatusEvent):void
>                 {
>                         Alert.show(event.toString());
>                 }
>                 function progressHandler(event:ProgressEvent):void
>                 {
>                         Alert.show("In Progress!");
>                 }
>                 function IOhandler(event:IOErrorEvent):void
>                 {
>                         Alert.show("IO Error");
>                 }
>                 function activateHandler(event:Event):void
>                 {
>                         Alert.show("Activated!");
>                 }
>                 function cancelHandler(event:Event):void
>                 {
>                         fileRef.cancel();
>                         Alert.show("Cancelled!");
>                 }
>         }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to