An exception occurred in the client script. server returned status error.

why always an error occurs while publishing. Mostly in the case of File upload. 

Hello Vijay,

This does not seem enough for ud to help you.
We need to understand the context when this happens.
In general terms, it seems that you have a script (JavaScript) problem, but it is not possible to help with the information provided.

Please, help us help you :)