-
Notifications
You must be signed in to change notification settings - Fork 343
chore: Rename references to Storage Manager in docs to File Uploader #5697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
bcb5767
056d491
74b449d
e4fba69
984666e
6a2b316
f2ea013
251a491
e2e8c62
35b8c13
29cfacc
ac198f7
dcab39e
8c03f62
e6906d1
6b2750c
13532a8
3dc67b3
6144123
cfa7533
57425f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,6 +165,14 @@ module.exports = withNextPluginPreval({ | |
destination: '/react/components/accordion', | ||
permanent: false, | ||
}, | ||
/** | ||
* Renamed "Storage Manager" to "File Uploader" | ||
*/ | ||
{ | ||
source: '/react/connected-components/storage/storagemanager', | ||
destination: '/react/connected-components/storage/fileuploader', | ||
permanent: true, | ||
}, | ||
Comment on lines
+171
to
+175
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this cover redirects from the primary docs that are linking to the existing StorageManager documentation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe so. This is the only endpoint linked in the primary docs. There is also a PR under review which updates the links to use the |
||
/** | ||
* Redirect traffic from CRA to Vite getting started page | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Alert } from '@aws-amplify/ui-react'; | ||
|
||
export const FileUploaderAlert = () => { | ||
return ( | ||
<Alert variation="info" role="none"> | ||
StorageManager has been renamed to FileUploader. The FileUploader export | ||
is available since version 3.3.0, previous versions must still use | ||
StorageManager. | ||
calebpollman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
</Alert> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -1,6 +1,6 @@ | ||||||||||
--- | ||||||||||
title: Storage Manager | ||||||||||
description: The Storage Manager lets your users upload and manage files to the cloud. | ||||||||||
title: File Uploader | ||||||||||
description: The File Uploader lets your users upload and manage files to the cloud. | ||||||||||
|
title: File Uploader | |
description: The File Uploader lets your users upload and manage files to the cloud. | |
title: FileUploader | |
description: The FileUploader lets your users upload and manage files in the cloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -5,9 +5,10 @@ import AppDirectoryAlert from '@/components/AppDirectoryAlert'; | |||||
import { ComponentStyleDisplay } from '@/components/ComponentStyleDisplay'; | ||||||
import ReactPropsTable from '@/components/propsTable/ReactPropsTable'; | ||||||
import { Example, ExampleCode } from '@/components/Example'; | ||||||
import { FileUploaderAlert } from '@/components/FileUploaderAlert'; | ||||||
import { Fragment } from '@/components/Fragment'; | ||||||
import { InstallScripts } from '@/components/InstallScripts'; | ||||||
import { STORAGE_MANAGER, FILE_PICKER, DROPZONE_PROPS, DISPLAY_TEXT } from './props'; | ||||||
import { FILE_UPLOADER, FILE_PICKER, DROPZONE_PROPS, DISPLAY_TEXT } from './props'; | ||||||
import { | ||||||
DefaultExample, | ||||||
ComponentOverridesExample, | ||||||
|
@@ -34,13 +35,15 @@ import { | |||||
|
||||||
<AppDirectoryAlert /> | ||||||
|
||||||
To use the StorageManager component import it into your React application with the included styles. | ||||||
<FileUploaderAlert /> | ||||||
|
||||||
To use the FileUploader component import it into your React application with the included styles. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add an informational alert here that StorageManager is now FileUploader There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. Should I still keep the "Storage Manager is deprecated" warning alert in the deprecated props section? |
||||||
|
||||||
<InstallScripts component="storage" /> | ||||||
|
||||||
<ExampleCode> | ||||||
```jsx | ||||||
import { StorageManager } from '@aws-amplify/ui-react-storage'; | ||||||
import { FileUploader } from '@aws-amplify/ui-react-storage'; | ||||||
import '@aws-amplify/ui-react/styles.css'; | ||||||
``` | ||||||
</ExampleCode> | ||||||
|
@@ -60,14 +63,14 @@ At a minimum you must include the `path` and `maxFileCount` props. `path` refers | |||||
</Example> | ||||||
|
||||||
### Private or Protected Buckets | ||||||
When uploading to private or protected S3 buckets, you'll need to wrap your app in the `Authenticator`, allowing the `StorageManager` component to infer the Cognito `identityId` of the currently signed-in user. This can be done directly with the `Authenticator` component or with `withAuthenticator`, as shown in [Add the Authenticator](/connected-components/authenticator#step-3-add-the-authenticator). | ||||||
When uploading to private or protected S3 buckets, you'll need to wrap your app in the `Authenticator`, allowing the `FileUploader` component to infer the Cognito `identityId` of the currently signed-in user. This can be done directly with the `Authenticator` component or with `withAuthenticator`, as shown in [Add the Authenticator](/connected-components/authenticator#step-3-add-the-authenticator). | ||||||
|
||||||
The example below shows configuring the StorageManager to upload to the `protected` folder under the users' identity id. | ||||||
The example below shows configuring the FileUploader to upload to the `protected` folder under the users' identity id. | ||||||
|
||||||
<Example> | ||||||
<ExampleCode> | ||||||
```jsx | ||||||
<StorageManager | ||||||
<FileUploader | ||||||
acceptedFileTypes={['image/*']} | ||||||
path={({ identityId }) => `protected/${identityId}/`} | ||||||
maxFileCount={1} | ||||||
|
@@ -78,6 +81,11 @@ The example below shows configuring the StorageManager to upload to the `protect | |||||
</Example> | ||||||
|
||||||
### Deprecated props | ||||||
|
||||||
<Alert variation="warning" heading="Storage Manager is deprecated"> | ||||||
|
<Alert variation="warning" heading="Storage Manager is deprecated"> | |
<Alert variation="warning" heading="Storage Manager renamed"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's move this alert to the top of the page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done and done
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This component used to be called Storage Manager. The Storage Manager component has been deprecated, and all functionality is retained by the File Uploader component. | |
StorageManager component has been renamed `FileUploader` as of `aws-amplify/ui-react-storage` version `3.3.0`. Please upgrade to the new import path, as the `StoraageManager` will be removed in a future major version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -830,8 +830,4 @@ The 3.x version of `@aws-amplify/ui-react-storage` has a minimum dependency of 6 | |
|
||
#### 1. public accessLevel becomes 'guest' in Storage components | ||
|
||
Starting in v6 of the Amplify JS libraries, `'public'` access level, meaning unauthentiated users can access it, became `'guest'`. The `accessLevel` property on StorageManager and StorageImage components have been updated to reflect this change. | ||
|
||
#### 2. Removal of FileUploader | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's back! |
||
|
||
The FileUploader component was the predecessor to the [`StorageManager`](../connected-components/storage/storagemanager) component. In this major version we are removing the FileUploader component. Please use the StorageManager component which covers all of the use-cases of FileUploader and more. | ||
Starting in v6 of the Amplify JS libraries, `'public'` access level, meaning unauthentiated users can access it, became `'guest'`. The `accessLevel` property on FileUploader and StorageImage components have been updated to reflect this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍