diff --git a/service/explorer/file.go b/service/explorer/file.go index 246d4a7dd1..b6d5f58d6d 100644 --- a/service/explorer/file.go +++ b/service/explorer/file.go @@ -230,11 +230,13 @@ func (service *FileIDService) CreateDocPreviewSession(ctx context.Context, c *gi srcB64 := base64.StdEncoding.EncodeToString([]byte(downloadURL)) srcEncoded := url.QueryEscape(downloadURL) srcB64Encoded := url.QueryEscape(srcB64) + return serializer.Response{ Code: 0, Data: util.Replace(map[string]string{ "{$src}": srcEncoded, "{$srcB64}": srcB64Encoded, + "{$name}": url.QueryEscape(fs.FileTarget[0].Name), }, model.GetSettingByName("office_preview_service")), } }