mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 07:02:37 +08:00
* version-1.9.0-docs * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
20 lines
560 B
JavaScript
20 lines
560 B
JavaScript
const url = `${process.env.LANGFLOW_URL ?? ""}/api/v2/files/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34`;
|
|
|
|
const options = {
|
|
method: 'GET',
|
|
headers: {
|
|
"accept": `application/json`,
|
|
"x-api-key": `${process.env.LANGFLOW_API_KEY ?? ""}`,
|
|
},
|
|
};
|
|
|
|
fetch(url, options)
|
|
.then(async (response) => {
|
|
if (!response.ok) {
|
|
throw new Error(`HTTP ${response.status}`);
|
|
}
|
|
const data = await response.arrayBuffer();
|
|
console.log("Received binary response for downloaded_file.txt", data.byteLength);
|
|
})
|
|
.catch((error) => console.error(error));
|