Error#2037 while uploading image in flex web application

17 views
Skip to first unread message

flexlearner

unread,
Sep 26, 2012, 8:16:16 AM9/26/12
to flex_...@googlegroups.com
Dear All,
                      When i upload an image sometimes i am getting "Error#2037", but not always.
 I read in the flex help that if the filereference browse method is not called before upload then the same
error will appear, but i usd the correct sequence alongwith event-listeners.
Please suggest the cause of error.


Regards,
Kanti


mohammed azeem

unread,
Sep 29, 2012, 5:27:20 AM9/29/12
to flex_...@googlegroups.com

In that case you can catch the errors and notify the user , with your own msg

// code snippet
var file:FileReference = new FileReference();/// make this as globla variable
file.addEventListener(Event.SELECT,onFileSelect);
file.addEventListener(Event.CANCEL, onCancelHandler);
var fileFilters:Array = [];
fileFilters.push(new FileFilter("Images", "*.gif;*.jpeg;*.jpg;*.png;*.tif"));
file.browse(fileFilters);

                function onFileSelect(event:Event):void
{
file.addEventListener(Event.COMPLETE,onFileLoad);
file.addEventListener(IOErrorEvent.IO_ERROR,onFileLoadError);
file.load();
}

                function onFileLoadError(event:IOErrorEvent):void
{
Alert.show("Show Your msg here");
}





--
You received this message because you are subscribed to the Google Groups "Flex India Community" group.
To view this discussion on the web visit https://groups.google.com/d/msg/flex_india/-/ONcUKOmbrG4J.
To post to this group, send email to flex_...@googlegroups.com.
To unsubscribe from this group, send email to flex_india+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.

Gaurav Pandey

unread,
Sep 30, 2012, 2:55:55 AM9/30/12
to flex_...@googlegroups.com
Dear kanti,
 
Please post your code sequence if possible for clearification of issues.
 
Regards,
Gaurav

On Wed, Sep 26, 2012 at 5:46 PM, flexlearner <kantis...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages