-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui-react-storage): add StorageManager (#3589)
Co-authored-by: Scott Rees <6165315+reesscot@users.noreply.github.com> Co-authored-by: Caleb Pollman <cpollman@amazon.com> Co-authored-by: Ioana Brooks <68251134+ioanabrooks@users.noreply.github.com>
- Loading branch information
1 parent
72d5e06
commit 3c3fbf4
Showing
131 changed files
with
6,317 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
"@aws-amplify/ui-react-storage": major | ||
"@aws-amplify/ui-react": minor | ||
--- | ||
|
||
FileUploader becomes StorageManager! | ||
|
||
Creating a new package `@aws-amplify/ui-react-storage` to keep all future Storage related connected components, the first of which is the StorageManager. | ||
The StorageManager is a partial re-write of the FileUploader to address some customer issues and make the component more scalable for the future. | ||
|
||
Some notable changes from FileUploader -> StorageManager | ||
|
||
* Component slots: You can override each part of the StorageManager with your custom UI | ||
* Pre-upload process files: You can use this to programatically change file names before upload or perform optimizations and validations. | ||
* Easy text updates: The StorageManager component has a `displayText` prop where you can pass in all the text the component uses. | ||
|
||
```jsx | ||
import { StorageManager } from '@aws-amplify/ui-react-storage'; | ||
|
||
export const DefaultStorageManagerExample = () => { | ||
return ( | ||
<StorageManager | ||
acceptedFileTypes={['image/*']} | ||
accessLevel="public" | ||
maxFileCount={1} | ||
/> | ||
); | ||
}; | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
...latform]/connected-components/storage/fileuploader/examples/IsPreviewerVisibleExample.tsx
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...fileuploader/examples/MaxFilesExample.tsx → ...uploader/examples/MaxFileCountExample.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../fileuploader/examples/MaxSizeExample.tsx → ...euploader/examples/MaxFileSizeExample.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
...c/pages/[platform]/connected-components/storage/fileuploader/examples/MultipleExample.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...rm]/connected-components/storage/storagemanager/examples/DefaultStorageManagerExample.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { StorageManager } from '@aws-amplify/ui-react-storage'; | ||
|
||
export const DefaultStorageManagerExample = () => { | ||
return ( | ||
<StorageManager | ||
acceptedFileTypes={['image/*']} | ||
accessLevel="public" | ||
maxFileCount={1} | ||
isResumable | ||
provider="slow" // IGNORE | ||
/> | ||
); | ||
}; |
Oops, something went wrong.