1
我試圖用一些columns.File上傳沿uplode文件成功地偏偏剩餘列取[對象對象]類型爲什麼數據庫中存儲的翻譯:鍵入
表
public partial class CreateUserIdentity
{
public int Id { get; set; }
public string Email { get; set; }
public string Image { get; set; }
public string password { get; set; }
}
AngularJs
var description = {
Passwoed: $scope.FileDescription,
Email : $scope.Email
}
FileUploadService.UploadFile($scope.SelectedFileForUpload, description
).then(function (d) {
});
的mvc控制器
[HttpPost]
public JsonResult SaveFiles(string description)
{
if (Request.Files != null)
{
CreateUserIdentity f = new CreateUserIdentity
{
Image = actualFileName,
Email = description,
};
using (ProjectsEntities dc = new ProjectsEntities())
{
dc.CreateUserIdentities.Add(f);
dc.SaveChanges();
Message = "File uploaded successfully";
flag = true;
}
}
return new JsonResult { Data = new { Message = Message, Status = flag } };