From 1c9e1b4ec2365266ef2d8da318918ae50d5fd24a Mon Sep 17 00:00:00 2001 From: Ryan Toronto Date: Thu, 14 Sep 2023 22:03:59 -0400 Subject: [PATCH] docs and formatting --- packages/docs-site/src/pages/use-s3-upload.mdx | 1 + packages/next-s3-upload/src/hooks/use-upload-files.tsx | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/docs-site/src/pages/use-s3-upload.mdx b/packages/docs-site/src/pages/use-s3-upload.mdx index 599ad83..164e4b6 100644 --- a/packages/docs-site/src/pages/use-s3-upload.mdx +++ b/packages/docs-site/src/pages/use-s3-upload.mdx @@ -58,3 +58,4 @@ The `files` array returned from `useS3Upload()` contains a list of files that ar | `uploaded` | An integer representing the total number of bytes that been uploaded so far. | | `size` | An integer representing the total size of the file. | | `progress` | The percentage (between 0 and 100) of the file that has been uploaded. | +| `id` | A unique identifier for the file. | diff --git a/packages/next-s3-upload/src/hooks/use-upload-files.tsx b/packages/next-s3-upload/src/hooks/use-upload-files.tsx index 4124882..d13fa0e 100644 --- a/packages/next-s3-upload/src/hooks/use-upload-files.tsx +++ b/packages/next-s3-upload/src/hooks/use-upload-files.tsx @@ -45,7 +45,13 @@ export const useUploadFiles = () => { let addFile = (file: File) => { setFiles(files => [ ...files, - { file, progress: 0, uploaded: 0, size: file.size, id: uuid()}, + { + file, + progress: 0, + uploaded: 0, + size: file.size, + id: uuid(), + }, ]); };