FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add support for opening URLs (lazy database file) by boramalper · Pull Request #278 · sql-js/sql.js · GitHub

/ sql.js Public

Add support for opening URLs (lazy database file) - #278

Open
boramalper wants to merge 1 commit into
sql-js:masterfrom
boramalper:master
Open

Add support for opening URLs (lazy database file)#278
boramalper wants to merge 1 commit into
sql-js:masterfrom
boramalper:master

Conversation

boramalper commented Jun 2, 2019
edited
Loading

Copy link
Copy Markdown

I've added support for opening URLs using FS.createLazyFile API of Emscripten. I've modified api.coffee and worker.coffee respectively.

It might be also useful to document somewhere (README or the API docs?) that the following headers must be present for the file to be lazy-loaded (see library_fs.js:1703):

  1. Accept-Ranges: bytes
  2. Content-Length
  3. Content-Encoding (if other than identity)

Care must be taken that these headers are accessible from XHR requests, thus appropriate CORS headers (e.g. Access-Control-Expose-Headers) must be set accordingly.

Copy link
Copy Markdown
Author

See https://boramalper.github.io/client-side-sqlite/ for a demo.

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 join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL