Skip to content

How to read .gp file from local disk #650

Answered by Danielku15
dkjMusic asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there.
It seems you're rather new to web development. Browsers have security mechanism in place which prevent loading files from local disk. Imagine if this would be allowed: any website could load files from your disk without you knowing.

alphaTab loads file via AJAX when using the file property. Any existing browser restrictions apply to load files.

In short: You will need to run alphaTab within a proper webserver and then you can load files from this same domain (keyword CORS). Or you build something that allows users to select a file via file picker & drag+drop. There are many tutorials around how to load files after a user opened it via file picker: https://developer.mozilla.org/e…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dkjMusic
Comment options

@marriusco
Comment options

Answer selected by Danielku15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants