😎调整本地文件存储不用绝对路径
This commit is contained in:
parent
3b8d95c032
commit
92f0a6d700
@ -417,11 +417,7 @@ public class SysFileService : IDynamicApiController, ITransient
|
||||
await file.CopyToAsync(stream);
|
||||
}
|
||||
|
||||
// 生成外链
|
||||
var host = CommonUtil.GetLocalhost();
|
||||
if (!host.EndsWith('/'))
|
||||
host += "/";
|
||||
newFile.Url = $"{host}{newFile.FilePath}/{newFile.Id + newFile.Suffix}";
|
||||
newFile.Url = $"{newFile.FilePath}/{newFile.Id + newFile.Suffix}";
|
||||
}
|
||||
await _sysFileRep.AsInsertable(newFile).ExecuteCommandAsync();
|
||||
return newFile;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user