Skip to content

Commit 8b06a53

Browse files
authored
Fix S3-client example in the documentation (#729)
1 parent f34e9f7 commit 8b06a53

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

readme.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,16 @@ console.log(fileType);
256256
Or use [`@tokenizer/s3`](https://github.com/Borewit/tokenizer-s3) to determine the file type of a file stored on [Amazon S3](https://aws.amazon.com/s3):
257257

258258
```js
259-
import S3 from 'aws-sdk/clients/s3';
260-
import {makeTokenizer} from '@tokenizer/s3';
259+
import {S3Client} from '@aws-sdk/client-s3';
260+
import {makeChunkedTokenizerFromS3} from '@tokenizer/s3';
261261
import {fileTypeFromTokenizer} from 'file-type';
262262

263263
// Initialize the S3 client
264-
const s3 = new S3();
264+
// Initialize S3 client
265+
const s3 = new S3Client();
265266

266267
// Initialize the S3 tokenizer.
267-
const s3Tokenizer = await makeTokenizer(s3, {
268+
const s3Tokenizer = await makeChunkedTokenizerFromS3(s3, {
268269
Bucket: 'affectlab',
269270
Key: '1min_35sec.mp4'
270271
});

0 commit comments

Comments
 (0)