2

Hy guy.

I really tried to do it work but all im getting is an "IO Error".

Here's the code...

    $('#uploaded').uploadify({
        'uploader': '/Scripts/EggScripts/Uploadify/uploadify.swf',
        'cancelImg': '/Scripts/EggScripts/Uploadify/cancel.png',
        'buttonText': 'Anexar',
        'script':'Interaction/Upload',
        'folder': '/uploads/',
        'multi': true,
        'auto': true
    });

'

    [AcceptVerbs( HttpVerbs.Post )]
    public string Upload(HttpPostedFileBase file)
    {}

The breakpoint Upload action is not even being reached. I'm not using any Authorize decoration.

Any sugestion?

2 Answers 2

2

If the Upload action requires authentication this might not work because Uploadify relies on Flash and cookies are not sent along with the request. Also replace all hardcoded urls in your script with ones generated by url helpers:

'uploader': '@Url.Content("~/Scripts/EggScripts/Uploadify/uploadify.swf")',
'cancelImg': '@Url.Content("~/Scripts/EggScripts/Uploadify/cancel.png")',
...

You can also subscribe for different event handlers to try to further debug:

$('#uploaded').uploadify({
    ...

    onComplete : function() {

    },
    onOpen : function() {

    },
    onError : function (event, id, fileObj, errorObj) {

    }
});

Another thing to try is to put a breakpoint in the Application_Error event in Global.asax to see if some exception is thrown during the execution of the request on the server.

Sign up to request clarification or add additional context in comments.

Comments

1

Uploadify recommends all paths be rooted so perhaps rooting the script param will help?

'script':'/Interaction/Upload'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.