Post Back For AjaxUploader MVC

  •  02-06-2013, 10:43 PM

    Post Back For AjaxUploader MVC

    I would like to gather additional information about the files a user plans to upload, but cannot see how to accomplish this.  I would like to reload the page but preserve the uploaded files in their temporary file location in order to gather more inofrmation about them.  I am using a .NET MVC4 project.  In the following code there is a commented statement.  "You should validate it here:"  What do people do if in their validation the files are not proper?  How do they pass the string myuploader back to the form so that the uploader recognizes it, so that the user does not have to choose his files again.  What I am planning on doing is checking for the additional information that I would like based on the files submittted, so that I can then name them properly and place them in the proper place on our server

     

    Hope what I am asking makes sense 

     

                       foreach (string strguid in myuploader.Split('/'))
                       {
                           Guid fileguid = new Guid(strguid);
                           CuteWebUI.MvcUploadFile file = uploader.GetUploadedFile(fileguid);
                           if (file != null)
                           {
                               //you should validate it here: 
                               //now the file is in temporary directory, you need move it to target location
                               //file.MoveTo("~/uploads/AdditionalServices/" + file.FileName);
                               processedfiles.Add(file.FileName);
                               System.Diagnostics.Debug.WriteLine("processedfiles.Add - " + file.FileName);
                           }
                       }
     

View Complete Thread