diff --git a/.vscode/launch.json b/.vscode/launch.json index 120bfe5e16..9a9f0cb02d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -381,9 +381,7 @@ "PORT": "4005", "SECRET": "secret", "MONGO_URL": "mongodb://localhost:27017", - "MINIO_ENDPOINT": "localhost", - "MINIO_ACCESS_KEY": "minioadmin", - "MINIO_SECRET_KEY": "minioadmin" + "STORAGE_CONFIG": "minio|localhost?accessKey=minioadmin&secretKey=minioadmin" }, "runtimeArgs": ["--nolazy", "-r", "ts-node/register"], "runtimeVersion": "20", diff --git a/services/print/pod-print/src/server.ts b/services/print/pod-print/src/server.ts index abff20f854..53a46f9963 100644 --- a/services/print/pod-print/src/server.ts +++ b/services/print/pod-print/src/server.ts @@ -193,7 +193,9 @@ export function createServer (dbUrl: string, storageConfig: StorageConfiguration throw new ApiError(400, 'Failed to convert') } - await storageAdapter.put(measureCtx, token.workspace, convertId, htmlRes, 'text/html', htmlRes.length) + const htmlBuf = Buffer.from(htmlRes) + + await storageAdapter.put(measureCtx, token.workspace, convertId, htmlBuf, 'text/html', htmlBuf.length) } res.contentType('application/json')