File Upload

File Upload

samevedzisamevedzi Posts: 24Questions: 5Answers: 0


I am trying to do file upload but I am getting the following error: File upload requires that 'Process' be called with an HttpRequest or UnvalidatedRequestValues object. I am using .Net Framework 4.5.2 and Editor-NETFramework-1.9.2. The Server Side script is shown below:

        public ActionResult CRUD()
                var formData = HttpContext.ApplicationInstance.Context.Request;
                var settings = iSource_Editor.Properties.Settings.Default;

                using (var db = new Database(settings.DbType, settings.DbConnection))
                    int User_ID = (int)Session["ID"];
                    var response = new Editor(db, "Contract_Doc_Name", "ID")
                            new Field("File_ID")
                                    new Upload(formData.PhysicalApplicationPath + @"Uploads\__ID____EXTN__")
                                        .Db("Files", "ID", new Dictionary<string, object>
                                            {"web_path", Upload.DbType.WebPath},
                                            {"system_path", Upload.DbType.SystemPath},
                                            {"filename", Upload.DbType.FileName},
                                            {"filesize", Upload.DbType.FileSize}
                        .Field(new Field("CreatedBy").Set(Field.SetType.Create).SetValue(User_ID))
                        .Field(new Field("CreatedDate").Set(Field.SetType.Create).SetValue(DateTime.Now))
                        .Field(new Field("ModifiedBy").Set(Field.SetType.Both).SetValue(User_ID))
                        .Field(new Field("ModifiedDate").Set(Field.SetType.Both).SetValue(DateTime.Now));

                    DtResponse data = response.Data();
                    return Json(data, JsonRequestBehavior.AllowGet);
            catch (Exception Ex)
                return Json(new { error = Ex.Message.ToString() }, JsonRequestBehavior.AllowGet);

I tried following the forum at : but the file provided is no longer available.

Kindly assist.



  • allanallan Posts: 57,730Questions: 1Answers: 9,203 Site admin

    Hi Stephen,

    If you were to use just response.Process(formData); does it allow the upload then?

    This is the method it should be hitting when using the Unvalidated data input, but it would be interesting to see what happens with just the HttpRequest.

    Meanwhile, we'll get it running locally and see what is going on.


  • samevedzisamevedzi Posts: 24Questions: 5Answers: 0

    Hi Allan,

    Thanks for the response.

    I have tried just response.Process(formData). It did not work.


Sign In or Register to comment.