mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-27 03:14:11 +00:00
feat(transcode): stream uploads and transcode output to prevent memory crashes on large files
This commit is contained in:
@@ -94,11 +94,14 @@ describe('S3 API', () => {
|
||||
|
||||
const res = await app.request('/files/b1/test.webp', {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'content-length': body.byteLength.toString(),
|
||||
},
|
||||
body,
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
expect(await res.text()).toBe('OK')
|
||||
expect(mockPut).toHaveBeenCalledWith('b1', 'test.webp', expect.any(Buffer), body.byteLength)
|
||||
expect(mockPut).toHaveBeenCalledWith('b1', 'test.webp', expect.anything(), body.byteLength)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user