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

<<  June 2017  >>
MoTuWeThFrSaSu
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

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 2017

Subscribe