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

Get URL for img src not working #6

Open
arj03 opened this issue Sep 6, 2019 · 0 comments
Open

Get URL for img src not working #6

arj03 opened this issue Sep 6, 2019 · 0 comments

Comments

@arj03
Copy link

arj03 commented Sep 6, 2019

I'm using this library like this:

      const mutableAccess = require('random-access-idb-mutable-file')
      mutableAccess.mount({}).then((requestFile) => {
        var f = requestFile(filepath)
        f.open((err) => {
          f.file.getFile().then((fileObj) => {
            cb(null, URL.createObjectURL(fileObj))
          })
        })
      })

I get an URL like blob:null/ae825970-3f3a-4834-bc5c-ada3789b83c5 from createObjectURL, but if I try to use this as img src=, the blob is not properly loaded. Any idea how to go about this?

Thanks

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

1 participant