Skip to content

Commit

Permalink
prettier-write
Browse files Browse the repository at this point in the history
  • Loading branch information
BSalaeddin committed Aug 23, 2024
1 parent 1072afb commit f11ae0c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/UpupUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const UpupUploader: FC<UpupUploaderProps & RefAttributes<any>> =
bucket,
key,
file,
acl: s3Configs.acl
acl: s3Configs.acl,
})
.then(data => {
console.log(data)
Expand Down
11 changes: 9 additions & 2 deletions src/lib/uploadObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ type props = {
bucket: string
key: string
file: File
acl?: 'public-read' | 'private' | 'authenticated-read' | 'aws-exec-read' | 'bucket-owner-full-control' | 'bucket-owner-read' | 'public-read-write'
acl?:
| 'public-read'
| 'private'
| 'authenticated-read'
| 'aws-exec-read'
| 'bucket-owner-full-control'
| 'bucket-owner-read'
| 'public-read-write'
}

type UploadObjectResponse = {
Expand All @@ -28,7 +35,7 @@ export const uploadObject = async ({
bucket,
key,
file,
acl = 'public-read'
acl = 'public-read',
}: props): Promise<UploadObjectResponse> => {
/**
* Define the parameters for the object you want to upload.
Expand Down
9 changes: 8 additions & 1 deletion src/types/S3Configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@ export type S3Configs = {
secretAccessKey: string
}
requestHandler?: any
acl?: 'public-read' | 'private' | 'authenticated-read' | 'aws-exec-read' | 'bucket-owner-full-control' | 'bucket-owner-read' | 'public-read-write'
acl?:
| 'public-read'
| 'private'
| 'authenticated-read'
| 'aws-exec-read'
| 'bucket-owner-full-control'
| 'bucket-owner-read'
| 'public-read-write'
}

0 comments on commit f11ae0c

Please sign in to comment.