[Backend] 修復 SaveDeviceKind 上傳圖片問題

This commit is contained in:
dev01 2022-12-26 14:36:24 +08:00
parent 47dad15e3e
commit 6fdeb7096b

View File

@ -1281,7 +1281,9 @@ namespace Backend.Controllers
{
//刪除原本的檔案
FolderFunction folderFunction = new FolderFunction();
if (deviceKind.Device_image != null) {
folderFunction.DeleteFile(Path.Combine(deviceKindFileSaveAsPath, deviceKind.Device_image));
}
var split = post.Device_image_file.FileName.Split(".");
var fileName = image_guid + "." + split[split.Length - 1];