Skip to content

FRAM-929 fix content type for heic image renders#62

Merged
viralauraframes merged 2 commits into
masterfrom
fix_xontenttype_heic
Apr 21, 2026
Merged

FRAM-929 fix content type for heic image renders#62
viralauraframes merged 2 commits into
masterfrom
fix_xontenttype_heic

Conversation

@viralauraframes
Copy link
Copy Markdown
Collaborator

Instead of forcing the contenttype to be jpeg, make it based off of image data headers.

@notion-workspace
Copy link
Copy Markdown

bantonj
bantonj previously approved these changes Apr 21, 2026
Comment thread pushd_plugin.go Outdated
return base64.StdEncoding.EncodeToString(hash.Sum(nil))
}

func contentTypeFromData(data []byte) string {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's probably better to pass the image type into beforeResponse than try to figure it out here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I will see about updating it.
@bantonj also is there any other place this needs to be changed? I only could figure out 1 place where this was hardcoded and so was obvious.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the only entry point.

@bantonj bantonj dismissed their stale review April 21, 2026 16:56

I think passing the image type in is cleaner.

Comment thread pushd_plugin.go Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we pass in the content type here instead of trying to figure it out from the data?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will check

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bantonj check now!

Copy link
Copy Markdown
Collaborator

@bantonj bantonj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@viralauraframes viralauraframes merged commit 278ea14 into master Apr 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants