😎去掉文件上传验证文件头类型
This commit is contained in:
parent
490a22126c
commit
144bb625db
@ -340,8 +340,8 @@ public class SysFileService : IDynamicApiController, ITransient
|
|||||||
// 防止客户端伪造文件类型
|
// 防止客户端伪造文件类型
|
||||||
if (!string.IsNullOrWhiteSpace(allowSuffix) && !allowSuffix.Contains(suffix))
|
if (!string.IsNullOrWhiteSpace(allowSuffix) && !allowSuffix.Contains(suffix))
|
||||||
throw Oops.Oh(ErrorCodeEnum.D8003);
|
throw Oops.Oh(ErrorCodeEnum.D8003);
|
||||||
if (!VerifyFileExtensionName.IsSameType(file.OpenReadStream(), suffix))
|
//if (!VerifyFileExtensionName.IsSameType(file.OpenReadStream(), suffix))
|
||||||
throw Oops.Oh(ErrorCodeEnum.D8001);
|
// throw Oops.Oh(ErrorCodeEnum.D8001);
|
||||||
|
|
||||||
var path = string.IsNullOrWhiteSpace(savePath) ? _uploadOptions.Path : savePath;
|
var path = string.IsNullOrWhiteSpace(savePath) ? _uploadOptions.Path : savePath;
|
||||||
path = path.ParseToDateTimeForRep();
|
path = path.ParseToDateTimeForRep();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user