Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use content-addressible hash for image filenames #38

Open
jamietanna opened this issue Dec 9, 2021 · 0 comments
Open

Use content-addressible hash for image filenames #38

jamietanna opened this issue Dec 9, 2021 · 0 comments

Comments

@jamietanna
Copy link
Contributor

To make it easier to deduplicate images, as well as programatically determine the output filename for a media file, could we move to using a content-addressible hash?

For instance, this is what my current media endpoint does:

      slug = DigestUtils.sha256Hex(Base64.getEncoder().encode(file.getBytes())).substring(0, 10);

Inspired by Marty's https://martymcgui.re/2017/01/26/spano-a-minimum-viable-micropub-media-endpoint/

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

No branches or pull requests

1 participant