public static void AddFile(string destinationFile) { var fileInfo = new FileInfo(destinationFile); var file = new Model.File(); file.Name = fileInfo.Name; file.Path = destinationFile; var fileId = RepositoryFile.SaveFileInDb(file, GetFileExtensionId(fileInfo)); MetadataService.AddMetadata(fileInfo, fileId); }
public static void AddFile(string destinationFile) { Util.Log(String.Format("FileTypes Created:14 ")); var fileInfo = new FileInfo(destinationFile); var file = new Model.File(); file.Name = fileInfo.Name; file.Path = destinationFile; //added file.CreateDate = fileInfo.CreationTime; //end Util.Log(String.Format("FileTypes Created:15 ")); var fileId = RepositoryFile.SaveFileInDb(file, GetFileExtensionId(fileInfo)); Util.Log(String.Format("FileTypes Created:16 ")); //MetadataService.AddMetadata(fileInfo, fileId); Util.Log(String.Format("FileTypes Created:17 ")); }