Skip to content

Commit

Permalink
absolute DuckDB FileAttachment URL (#389)
Browse files Browse the repository at this point in the history
* Use an absolute URL to ingest FileAttachments in DuckDB.

Co-authored-by: Mike Bostock <mbostock@gmail.com>
  • Loading branch information
Fil and mbostock committed Nov 29, 2023
1 parent 301bd60 commit 7f41029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/duckdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ async function insertFile(database, name, file, options) {
const buffer = await file.arrayBuffer();
await database.registerFileBuffer(file.name, new Uint8Array(buffer));
} else {
await database.registerFileURL(file.name, url, 4); // duckdb.DuckDBDataProtocol.HTTP
await database.registerFileURL(file.name, new URL(url, location).href, 4); // duckdb.DuckDBDataProtocol.HTTP
}
const connection = await database.connect();
try {
Expand Down

0 comments on commit 7f41029

Please sign in to comment.