How to set an error as return on controller and get it on uploadify in asp net mvc 4?

crashed

New Member
I am out of Ideas. The way the system is built I am not sure I can do what I have to do.This is the controller that processes the uploaded file coming from uploadify.\[code\]public ActionResult Upload(HttpPostedFileBase FileData, FormCollection form){ try { String path = String.Format("{0}{1}", caminhoArmazenamento, tipoDocNome); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); FileData.SaveAs(path); //HERE I NEED SOME CONTROL TO RETURN THAT THINGS WENT RIGHT } else { FileData.SaveAs(path); //HERE I NEED SOME CONTROL TO RETURN THAT THINGS WENT RIGHT } } catch(exception) { //HERE I NEED SOME CONTROL SAYING THAT THINGS WENT WRONG }}\[/code\]This is the uploadify:\[code\]$('#file_upload').uploadify({ 'swf': '../../Components/uploadify/uploadify.swf', 'uploader': '/Operacao/Upload', 'auto': false, 'buttonImage': '../../Images/uploadify/importar.jpg', 'buttonClass': 'uploadifyBtn', 'width': '250', 'height': '25', 'onFallback': function () { alert('Vers?o do flash n?o compativel com o sistema de upload. Favor contactar o administrador do sistema!'); }, 'onUploadError' : function(file, errorCode, errorMsg, errorString) { alert('O arquivo ' + file.name + ' n?o pode ser importado: ' + errorCode + ' - ' + errorMsg + ' - ' + errorString); }, 'onSelectError': function () { alert('Voc
 
Back
Top