Skip to content

Commit

Permalink
docs and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanto committed Sep 15, 2023
1 parent ae520c2 commit 1c9e1b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/docs-site/src/pages/use-s3-upload.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
8 changes: 7 additions & 1 deletion packages/next-s3-upload/src/hooks/use-upload-files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
},
]);
};

Expand Down

0 comments on commit 1c9e1b4

Please sign in to comment.