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

Should there be a way to share file-blob reference to the outside-js-code? #3

Open
recutz-alex opened this issue Dec 4, 2018 · 2 comments

Comments

@recutz-alex
Copy link

recutz-alex commented Dec 4, 2018

Currently, we are receiving and decoding file-data using input elements and storing blob ref as a Json.Value. We then pass this value around the app, for anybody to use, by encoding and attaching it to a custom element as a property.

This way any other component outside of elm-env may take a file ref and do whatever they want with it.

It would've been nice to migrate away from using input elements to a more explicit and concise API like elm/file, but unfortunately File does not expose its blob-ref and there's no conversion function like File -> Json.Value.

Should there be a way to share a file-ref with the outside-js-code?

@danabrams
Copy link

This would be very helpful for me too. It's a real impediment to using elm/file in certain cases because of the inability to pass through a port.

@dullbananas
Copy link

still not added after 2 years

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

3 participants