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

Data URI scheme parsing #58

Open
scls19fr opened this issue Mar 2, 2024 · 3 comments · May be fixed by #59
Open

Data URI scheme parsing #58

scls19fr opened this issue Mar 2, 2024 · 3 comments · May be fixed by #59

Comments

@scls19fr
Copy link

scls19fr commented Mar 2, 2024

Hello,

I wonder if URIs can parse data URI scheme ie https://datatracker.ietf.org/doc/html/rfc2397

An example can be found here

https://gist.githubusercontent.com/scls19fr/8d2330ae8c2ded145c80b1650500bed2/raw/90373199aaa65581b7919f34c568562c9641c5d4/sample_img.jl

Kind regards

PS : related issue might be JuliaLang/Downloads.jl#122
RegExp that could be used https://gist.github.com/khanzadimahdi/bab8a3416bdb764b9eda5b38b35735b8

@quinnj
Copy link
Member

quinnj commented Mar 12, 2024

We don't currently support this, but PRs are always welcome!

@scls19fr
Copy link
Author

Let's first discuss of the scope of such a PR.

Do you have an API idea?
Can/should I use some dependencies?

Can I use for example MIMEs.jl ?
Should I create a separated module? (or maybe should such a contribution be in a separate repository?)

Should we return image from Images.jl if mimetype is for example image/jpeg (same for other kind of mimetype) or do we simply return base64 encoded data?

Do we also accept creating data uri from file as python-datauri is doing ?

@scls19fr scls19fr linked a pull request Mar 12, 2024 that will close this issue
@scls19fr
Copy link
Author

I opened a PR #59 to have a discussion about implementation details.

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 a pull request may close this issue.

2 participants