This repository was archived by the owner on Oct 4, 2020. It is now read-only.
Add Blob URL actions (create|revoke)ObjectURL#78
Merged
Conversation
9e6ae44 to
5b948ca
Compare
Contributor
|
👍 I need it for putting image preview in an img tag. |
chexxor
reviewed
Feb 23, 2017
| import DOM.HTML.Types (URL) | ||
| import Data.Unit (Unit) | ||
|
|
||
| foreign import createObjectURL :: forall eff. URL -> File -> Eff (dom :: DOM | eff) String |
Contributor
There was a problem hiding this comment.
Make URL the last argument, perhaps, to make it easier to use like this:
fileObjectUrl <- createObjectURL someFile =<< url =<< window
Discussed here also: #75
Contributor
Author
There was a problem hiding this comment.
sounds good, made the change
5b948ca to
e1d0682
Compare
Member
|
Thanks! Sorry for the hold up. It's kinda a shame we need a new |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blob URL methods are commonly supported and used for crap like getting a URL for use in audio tags when sourced from file inputs and whatnot. I thought it'd be nice to have this in the library since it'll probably be useful for others' and
(Maybe some things could be renamed to make this less messy, idk)
My own use: