Skip to content

Commit 9900e8c

Browse files
committed
fix(storage): support content encoding on uploads
1 parent 851cddc commit 9900e8c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/core/storage-js/test/storageFileApi.test.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ const findOrCreateBucket = async (name: string, isPublic = true) => {
3535

3636
const uploadFilePath = (fileName: string) => path.resolve(__dirname, 'fixtures', 'upload', fileName)
3737

38-
39-
4038
describe('Object API', () => {
4139
let bucketName: string
4240
let file: Buffer
@@ -856,12 +854,10 @@ describe('StorageFileApi Edge Cases', () => {
856854
})
857855

858856
test('upload sets Content-Encoding when provided', async () => {
859-
await storage
860-
.from('test-bucket')
861-
.upload('test-path', new Uint8Array([1, 2, 3]), {
862-
contentType: 'application/octet-stream',
863-
contentEncoding: 'gzip',
864-
})
857+
await storage.from('test-bucket').upload('test-path', new Uint8Array([1, 2, 3]), {
858+
contentType: 'application/octet-stream',
859+
contentEncoding: 'gzip',
860+
})
865861

866862
expect(mockPost).toHaveBeenCalled()
867863
const [, , body, { headers }] = mockPost.mock.calls[0]

0 commit comments

Comments
 (0)