This repository was archived by the owner on Jan 11, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 428
Exported server routes returning binary files get corrupted #1103
Comments
this seems pretty serious. can you move the work to clientside? or must it be in a server route? |
In the API routes, I pull in images from a CMS and transform them using Sharp, so yes, it has to be server side. |
I ran into this issue, too. I realized that
JSON is |
Is there any news on this getting fixed? It seems like I cannot export binary files and this is blocking me. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
When a route points to a server route that emits a binary file (pdf, image etc.) and the site is
export
ed, the files on disk get corrupted because export only supports text results from server routes.To Reproduce
Result: the file is corrupt and cannot be opened.
Expected behavior
The result of server routes emitting binary data should be properly stored on disk when exporting.
Information about your Sapper Installation:
Severity
Blocking my attempt to load all data including binary assets (documents, images) from a headless CMS.
The text was updated successfully, but these errors were encountered: