fix:后台上传文件
This commit is contained in:
parent
a3197b7d55
commit
ffd3c95ade
|
@ -81,7 +81,13 @@ func (l *UploadFileBackendLogic) UploadFileBackend(req *types.UploadFileBackendR
|
|||
MysqlConn: l.svcCtx.MysqlConn,
|
||||
AwsSession: l.svcCtx.AwsSession,
|
||||
}
|
||||
var resourceId string = hash.JsonHashKey(req.FileKey)
|
||||
var resourceId string
|
||||
if len(req.FileKey) == 64 {
|
||||
resourceId = req.FileKey
|
||||
} else {
|
||||
resourceId = hash.JsonHashKey(req.FileKey)
|
||||
}
|
||||
|
||||
uploadRes, err := upload.UploadFileByByte(&file.UploadBaseReq{
|
||||
FileHash: resourceId,
|
||||
FileByte: ioData,
|
||||
|
|
Loading…
Reference in New Issue
Block a user