fix: wrap Bun.file().stream() in Readable.from() for Telegraf compat
Deploy FileDrop / deploy (push) Failing after 20s
Deploy FileDrop / deploy (push) Failing after 20s
- Replaces createReadStream / bare ReadableStream with Readable.from(Bun.file(path).stream()) — works in both test (Bun.write + Bun.file) and production (Node Readable) - Reverts writeBufferToTemp back to Bun.write
This commit is contained in:
+1
-2
@@ -17,8 +17,6 @@ beforeAll(async () => {
|
||||
'hex',
|
||||
);
|
||||
}
|
||||
// Pre-create temp file for multipart upload test
|
||||
await Bun.write('/tmp/filedrop-test-photo', realPhotoBuffer);
|
||||
});
|
||||
|
||||
// Mock db
|
||||
@@ -113,6 +111,7 @@ describe('Upload Route Handler', () => {
|
||||
mockFileRepo.create.mockClear();
|
||||
mockForwardToStorage.mockClear();
|
||||
mockFindByHashResult = null;
|
||||
nanoidCounter = 0;
|
||||
const uploadRoute = await import('../src/interfaces/http/controllers/upload-controller');
|
||||
handleUpload = uploadRoute.handleUpload;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user