333
This commit is contained in:
parent
6df1269fcd
commit
7f0cd141a5
|
|
@ -263,13 +263,33 @@ namespace ZR.Admin.WebApi.Controllers
|
|||
{
|
||||
return ToResponse(ResultCode.PARAM_ERROR, "请上传图片");
|
||||
}
|
||||
// -当日所有照片
|
||||
//- 当日根据【人名】分类的照片
|
||||
//- 当日根据【工作内容】分类的照片
|
||||
//- 当日根据【部门】分类的照片
|
||||
// -当日所有照片
|
||||
//- 当日根据【人名】分类的照片
|
||||
//- 当日根据【工作内容】分类的照片
|
||||
//- 当日根据【部门】分类的照片
|
||||
var imageprx = ImageConverter.GetFileExtensionFromBase64(parm.Image);
|
||||
var imageName = ImageConverter.GenerateImageFileName(imageprx);
|
||||
var filePath = "gift/" + DateTime.Now.ToString("yyyy/MMdd/");
|
||||
var filePath = "files/" + DateTime.Now.ToString("yyyyMMdd");
|
||||
var path = Path.GetFullPath(filePath);
|
||||
//try
|
||||
//{
|
||||
// var path = Path.GetFullPath(filePath);
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
// using (var stream = new FileStream(finalPath, FileMode.Create))
|
||||
// {
|
||||
// await stream.WriteAsync(images, 0, images.Length);
|
||||
// }
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
//}
|
||||
//if (!string.IsNullOrEmpty(domainUrl))
|
||||
//{
|
||||
// finalPath = domainUrl + "/" + finalPath;
|
||||
//}
|
||||
//备份一下本地
|
||||
var modal = parm.Adapt<CamWorkrecord>().ToCreate(HttpContext);
|
||||
modal.CreateTime = DateTime.Now;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user