Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/packages/lowcoder/src/util/fileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function saveDataAsFile({ data, filename, fileType, dataType }: Sav

if (dataType === "base64") {
const blob = new Blob([Buffer.from(data, "base64")], {
type: mime + ";charset=utf-16",
type: mim + ";charset=utf-16",
});
return saveAs(blob, filename, { autoBom: true });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ utils.downloadFile(query1.data, "users-data.xlsx")

// Example: Download the results of query1 as a XLXS file named users-data.
utils.downloadFile(restApiQuery.data, "users-data", {
fileType: "pdf",
fileType: "xlsx",
dataType: "base64",
})
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ private ResponseBodyData parseResponseDataInfo(byte[] body, MediaType contentTyp
}
if (isBinary(contentType)) {
return ResponseBodyData.builder()
.body(Base64.getEncoder().encode(body))
.body(body)
.dataType(ResponseDataType.BINARY)
.build();
}
Expand Down