Skip to content

Commit

Permalink
Use an absolute URL to ingest FileAttachments in DuckDB.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Nov 18, 2023
1 parent 301bd60 commit b230481
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, document.location).href, 4); // duckdb.DuckDBDataProtocol.HTTP
}
const connection = await database.connect();
try {
Expand Down

0 comments on commit b230481

Please sign in to comment.