File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ "use strict" ;
2+
3+ exports . createObjectURL = function ( blob ) {
4+ return function ( ) {
5+ return URL . createObjectURL ( blob ) ;
6+ } ;
7+ } ;
8+
9+ exports . revokeObjectURL = function ( url ) {
10+ return function ( ) {
11+ URL . revokeObjectURL ( url ) ;
12+ } ;
13+ } ;
Original file line number Diff line number Diff line change 1+ module Web.File.Url
2+ (createObjectURL
3+ , revokeObjectURL
4+ ) where
5+
6+ import Prelude
7+ import Effect (Effect )
8+ import Web.File.Blob (Blob )
9+
10+
11+ -- | Adds this blob to the url store
12+ -- | The string is a url that can be used to
13+ -- | 'download' the blob
14+ foreign import createObjectURL :: Blob -> Effect String
15+
16+ -- | Revoke a blob url from the url store
17+ -- | Doesn't throw errors on failure
18+ foreign import revokeObjectURL :: String -> Effect Unit
You can’t perform that action at this time.
0 commit comments