Option to Disable Auto Download in Browser-Based Environment #3054

Closed
opened 2024-01-09 18:10:52 +00:00 by Armadillidiid · 1 comment

After writing to a file using any of the write functions, it automatically triggers a download, which may not be desired in certain scenarios. I am working in a browser-based environment where I need to send the generated file through an API and do not want it to be automatically downloaded on the client side.

I would like if there's an option that allows users to disable the automatic download behavior after writing to a file. This will provide more flexibility for users who intend to handle file distribution through other means, such as API calls.

After writing to a file using any of the write functions, it automatically triggers a download, which may not be desired in certain scenarios. I am working in a browser-based environment where I need to send the generated file through an API and do not want it to be automatically downloaded on the client side. I would like if there's an option that allows users to disable the automatic download behavior after writing to a file. This will provide more flexibility for users who intend to handle file distribution through other means, such as API calls.
Owner

There is a live demo of the exact workflow: https://docs.sheetjs.com/docs/demos/net/upload/#fetch Starting from an array of arrays of data, it generates a XLSX file using write and sends a POST request.

More generally, "API Reference > Writing Files" covers this: https://docs.sheetjs.com/docs/api/write-options

write / writeXLSX returns file data. It does not initiate a file write or download.

writeFile / writeFileXLSX ultimately uses the same logic and attempts to generate a file based on platform.

There is a live demo of the exact workflow: https://docs.sheetjs.com/docs/demos/net/upload/#fetch Starting from an array of arrays of data, it generates a XLSX file using `write` and sends a POST request. More generally, "API Reference > Writing Files" covers this: https://docs.sheetjs.com/docs/api/write-options `write` / `writeXLSX` returns file data. It does not initiate a file write or download. `writeFile` / `writeFileXLSX` ultimately uses the same logic and attempts to generate a file based on platform.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#3054
No description provided.