Skip to content

Commit 62d4bfc

Browse files
Merge pull request #60 from pushd/parse_heif_outut_urls
FRAM-794 render heic if specified or default to jpg
2 parents a4f488a + 935461c commit 62d4bfc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pushd_plugin.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ func fileNameToParams(requestURI string, needsSig bool) string {
4848

4949
s3Path := getS3SourcePath(requestURI)
5050

51-
urlParam := fmt.Sprintf("/plain/s3://%s/%s@jpg", s3Path, splitFilename[len(splitFilename)-1])
51+
if imgParams["f"] != "heic" {
52+
// we either render a heic if specified or jpg as default.
53+
imgParams["f"] = "jpg"
54+
}
55+
urlParam := fmt.Sprintf("/plain/s3://%s/%s", s3Path, splitFilename[len(splitFilename)-1])
5256

5357
var pathStr string
5458
for param, value := range imgParams {

0 commit comments

Comments
 (0)