Update upload.go

Refactor SavePath assignment for clarity.
pull/2893/head
Darren Yu 5 days ago committed by GitHub
parent 82ac506216
commit d7d9fa6494
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -146,10 +146,7 @@ func (f *DBFS) PrepareUpload(ctx context.Context, req *fs.UploadRequest, opts ..
if req.Props.SavePath == "" || isThumbnailAndPolicyNotAvailable {
req.Props.SavePath = generateSavePath(policy, req, f.user)
if isThumbnailAndPolicyNotAvailable {
req.Props.SavePath = fmt.Sprintf(
"%s%s",
req.Props.SavePath,
f.settingClient.ThumbEntitySuffix(ctx))
req.Props.SavePath = req.Props.SavePath + f.settingClient.ThumbEntitySuffix(ctx)
}
}

Loading…
Cancel
Save