@axiom-lattice/gateway 2.1.113 → 2.1.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/controllers/workspace.ts +3 -3
package/package.json
CHANGED
|
@@ -583,7 +583,7 @@ export class WorkspaceController {
|
|
|
583
583
|
) {
|
|
584
584
|
const tenantId = this.getTenantId(request);
|
|
585
585
|
const { workspaceId, projectId } = request.params;
|
|
586
|
-
const assistantId = (request.query as any).assistantId;
|
|
586
|
+
const assistantId = (request.query as any).assistantId || (request.headers["x-assistant-id"] as string);
|
|
587
587
|
|
|
588
588
|
const workspace = await this.workspaceStore.getWorkspaceById(
|
|
589
589
|
tenantId,
|
|
@@ -635,12 +635,12 @@ export class WorkspaceController {
|
|
|
635
635
|
? path.posix.join(pathValue, filename)
|
|
636
636
|
: path.posix.join("/project/uploads", filename);
|
|
637
637
|
|
|
638
|
-
// Try volume backend for text files; binary files must use sandbox
|
|
639
|
-
// (volume backend's write API is text-based and corrupts binary data)
|
|
640
638
|
const isBinary = this.isBinaryContentType(filename);
|
|
641
639
|
const volumeBackend = await sandboxManager.getVolumeBackendForPath(volumeConfig, realPath);
|
|
642
640
|
if (volumeBackend && !isBinary) {
|
|
643
641
|
await volumeBackend.write(realPath, buffer.toString("utf-8"));
|
|
642
|
+
} else if (volumeBackend && volumeBackend.writeBinary) {
|
|
643
|
+
await volumeBackend.writeBinary(realPath, buffer);
|
|
644
644
|
} else {
|
|
645
645
|
const sandbox = await sandboxManager.getSandboxFromConfig(volumeConfig);
|
|
646
646
|
await sandbox.file.uploadFile({ file: realPath, data: buffer });
|