Giter Club home page Giter Club logo

Comments (7)

cmdcolin avatar cmdcolin commented on August 23, 2024

I can reproduce this. I think I have a fix and will release a new version shortly, just need to make sure to test!

from bam-js.

cmdcolin avatar cmdcolin commented on August 23, 2024

@lidaof Ok I have made two changes that should fix this, mostly with regards to compatibility with the browser's native fetch. If you want to try updating to @gmod/[email protected] to give it a shot that would be great!

from bam-js.

lidaof avatar lidaof commented on August 23, 2024

hi @cmdcolin thanks for fast fix, i can confirm if it's bamUrl, it's fixed. if use a bamPath, a new error raised :)

image

from bam-js.

cmdcolin avatar cmdcolin commented on August 23, 2024

I think you can't use bamPath in the browser as that tries to access the filesystem directly via node.js file system calls and this does not exist in the browser.

If you want to access for example a file that a user opened in the browser, you might want to use the BlobFile class in https://github.com/GMOD/generic-filehandle and pass it to the bamFilehandle/baiFilehandle argument. The bamPath/bamUrl are just convenience methods for using the generic-filehandle class directly

from bam-js.

cmdcolin avatar cmdcolin commented on August 23, 2024

Note that some of your earlier comments about this topic of opening files actually motivated the creation of generic-filehandle so I hope it is useful :) feel free to provide feedback

from bam-js.

cmdcolin avatar cmdcolin commented on August 23, 2024

It's designed hopefully to be usable across multiple modules such as cram-js, bam-js, bbi-js, tabix-js, etc.

from bam-js.

lidaof avatar lidaof commented on August 23, 2024

oh...yeah..stupid me....what i was thinking using local path in browser....sorry!
Thank you!! @cmdcolin

from bam-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.