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", "PORT": "4005",
"SECRET": "secret", "SECRET": "secret",
"MONGO_URL": "mongodb://localhost:27017", "MONGO_URL": "mongodb://localhost:27017",
"MINIO_ENDPOINT": "localhost", "STORAGE_CONFIG": "minio|localhost?accessKey=minioadmin&secretKey=minioadmin"
"MINIO_ACCESS_KEY": "minioadmin",
"MINIO_SECRET_KEY": "minioadmin"
}, },
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"], "runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
"runtimeVersion": "20", "runtimeVersion": "20",

View File

@ -193,7 +193,9 @@ export function createServer (dbUrl: string, storageConfig: StorageConfiguration
throw new ApiError(400, 'Failed to convert') 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') res.contentType('application/json')