Skip to content

Commit bf4446e

Browse files
authored
fix: use buffer to send file (#40)
* use buffer to send file * changelog * bump version * prettier
1 parent 24a48df commit bf4446e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
1414

1515
- Draft enabled entities can be print enabled
1616
- Entities with composite keys can be print enabled
17+
- File upload during printing is now formatted correctly
1718

1819
## Version 0.1.0 - 2025-11-28
1920

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cap-js/print",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "CAP plugin for SAP Cloud Print Service.",
55
"repository": "cap-js/print",
66
"homepage": "https://cap.cloud.sap/",

srv/BTPPrintService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ module.exports = class BTPPrintService extends PrintService {
7777
Authorization: `Bearer ${jwt}`,
7878
"Content-Type": "application/json",
7979
},
80-
body: JSON.stringify(doc.content),
80+
body: Buffer.from(doc.content, "base64"),
8181
});
8282
const responseData = await response.text();
8383
doc.objectKey = responseData;

0 commit comments

Comments
 (0)