uberf-8509: fix docx to html conversion (#6970)

This commit is contained in:
Alexey Zinoviev 2024-10-17 17:13:22 +04:00 committed by GitHub
parent 23027deb17
commit a0b9a9830b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

4
.vscode/launch.json vendored
View File

@ -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",

View File

@ -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')