uploadify showing an error

by Cliff 26. August 2010

Uploadify is an excellent upload plugin script.  One issue that I recently encountered was how to notify uploadify that an error occured with your server side scipt while processing a file.  I found that by returning a status code of 405, uploadify will mark the file as errored (highlight in red in the queue).

To accomplish this, you should set the status code to 405 with your response from your server side code.  The below example show how to do this in C#, the the same applies for any server side language (php, ruby, etc).

I have placed this in a finally block and check a local variable response and set the status code if the value is not success.

 finally
        {
            if (response != returnValueSuccess)

            {
                context.Response.StatusCode = 405;
            }
            context.Response.Write(response);
        }
}

 

Cliff Gray's Info

Cliff Gray
Developer/Founder GrayTechnology.com.

E-mail me Send mail

Authors

Calendar

<<  April 2018  >>
MoTuWeThFrSaSu
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

View posts in large calendar

Blogroll

Download BlogEngine.NET

Download at CodePlex

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2018

Subscribe