3
0

Fix attachment preview url

This commit is contained in:
Vivek Patel
2023-04-01 22:56:18 +05:30
parent f7aef56714
commit 8cf8161e50
+2 -2
View File
@@ -182,13 +182,13 @@ func makeAttachmentPayload(ctx context.Context, a *types.Attachment, err error)
ext = "jpg"
}
preview = baseURL + fmt.Sprintf("preview.%s", ext)
preview = baseURL + fmt.Sprintf("preview.%s", ext) + signParams
}
ap := &attachmentPayload{a}
ap.Url = baseURL + fmt.Sprintf("original/%s", url.PathEscape(a.Name)) + signParams
ap.PreviewUrl = preview + signParams
ap.PreviewUrl = preview
return ap, nil
}