Created
January 23, 2024 17:52
-
-
Save skgsergio/d5d230f5eb78e37be2a31f72e333d4d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mimetype=$(file -bN --mime-type "$1") | |
content=$(base64 -w0 < "$1") | |
echo "data:$mimetype;base64,$content" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment