Skip to content

Commit b6784bb

Browse files
authored
chore: Rename Storage Manager to File Uploader (#7921)
* chore: renaming Storage Manager to File Uploader * Update src/pages/[platform]/build-a-backend/storage/upload-files/index.mdx
1 parent 073215b commit b6784bb

File tree

8 files changed

+52
-52
lines changed

8 files changed

+52
-52
lines changed

cspell.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@
595595
"Figma",
596596
"Figma's",
597597
"figma",
598+
"fileuploader",
598599
"architected",
599600
"newsfeeds",
600601
"textareas",
@@ -1244,7 +1245,6 @@
12441245
"Storage.put",
12451246
"storagebucketname",
12461247
"storagedemo",
1247-
"storagemanager",
12481248
"storageOptions",
12491249
"storagepath",
12501250
"StoragePath",
File renamed without changes.

redirects.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
},
102102
{
103103
"source": "/ui/storage/s3-image-picker/q/framework/<platform>/",
104-
"target": "https://ui.docs.amplify.aws/react/connected-components/storage/storagemanager",
104+
"target": "https://ui.docs.amplify.aws/react/connected-components/storage/fileuploader",
105105
"status": "302"
106106
},
107107
{

src/directory/directory.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -796,10 +796,10 @@ export const directory = {
796796
{
797797
isExternal: true,
798798
route:
799-
'https://ui.docs.amplify.aws/react/connected-components/storage/storagemanager',
800-
title: 'Storage Manager',
799+
'https://ui.docs.amplify.aws/react/connected-components/storage/fileuploader',
800+
title: 'File Uploader',
801801
description:
802-
'Storage Manager is a connected component that facilitates operations such as uploading, downloading, listing, and deleting files from an Amazon S3 bucket.',
802+
'File Uploader is a connected component that facilitates operations such as uploading, downloading, listing, and deleting files from an Amazon S3 bucket.',
803803
platforms: ['javascript', 'nextjs', 'react']
804804
},
805805
{

src/pages/[platform]/build-a-backend/storage/upload-files/index.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ export function getStaticProps(context) {
3131

3232
<InlineFilter filters={["javascript","nextjs","react"]}>
3333

34-
You can implement upload functionality in your app by either using the Storage Manager UI component or further customizing the upload experience using the upload API.
34+
You can implement upload functionality in your app by either using the File Uploader UI component or further customizing the upload experience using the upload API.
3535

36-
## Storage Manager React UI Component
36+
## File Uploader React UI Component
3737

38-
Upload files from your app in minutes by using the cloud-connected Storage Manager UI Component.
38+
Upload files from your app in minutes by using the cloud-connected File Uploader UI Component.
3939

4040
```bash title="Terminal" showLineNumbers={false}
4141
npm add @aws-amplify/ui-react-storage aws-amplify
@@ -44,12 +44,12 @@ Then, use the component in your app.
4444
{/* Let's add explanations for the props - which are mandatory now? I know before it was maxFileCount and accessLevel */}
4545

4646
```tsx
47-
import { StorageManager } from '@aws-amplify/ui-react-storage';
47+
import { FileUploader } from '@aws-amplify/ui-react-storage';
4848
import '@aws-amplify/ui-react/styles.css';
4949

50-
export const DefaultStorageManagerExample = () => {
50+
export const DefaultFileUploaderExample = () => {
5151
return (
52-
<StorageManager
52+
<FileUploader
5353
acceptedFileTypes={['image/*']}
5454
path="public/"
5555
maxFileCount={1}
@@ -59,9 +59,9 @@ export const DefaultStorageManagerExample = () => {
5959
};
6060
```
6161

62-
![Showing Storage Manager UI component](/images/gen2/storage/upload-ui-component.png)
62+
![Showing File Uploader UI component](/images/gen2/storage/upload-ui-component.png)
6363

64-
Learn more about how you can further customize the UI component by referring to the [Storage Manager documentation](https://ui.docs.amplify.aws/react/connected-components/storage/storagemanager).
64+
Learn more about how you can further customize the UI component by referring to the [File Uploader documentation](https://ui.docs.amplify.aws/react/connected-components/storage/fileuploader).
6565

6666
</InlineFilter>
6767

src/pages/[platform]/build-ui/formbuilder/special-inputs/index.mdx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,38 @@ export function getStaticProps(context) {
2525

2626

2727

28-
## Storage Manager
28+
## File Uploader
2929

3030

31-
[**Storage Manager**](https://ui.docs.amplify.aws/react/connected-components/storage/storagemanager) fields allow your forms to accept file uploads, which are stored in an Amazon S3 bucket connected to your Amplify app. After uploading, that file's S3 key is stored in your data model, allowing for systematic retrieval using the [Amplify JS library](/[platform]/build-a-backend/storage/download-files/).
31+
[**File Uploader**](https://ui.docs.amplify.aws/react/connected-components/storage/fileuploader) fields allow your forms to accept file uploads, which are stored in an Amazon S3 bucket connected to your Amplify app. After uploading, that file's S3 key is stored in your data model, allowing for systematic retrieval using the [Amplify JS library](/[platform]/build-a-backend/storage/download-files/).
3232

3333

3434
### Prerequisites
3535

36-
In order to use the Storage Manager field, your Amplify app must have an Amplify app with [Authentication](/[platform]/build-a-backend/auth/set-up-auth/) and [Storage](/[platform]/build-a-backend/storage/set-up-storage/) enabled.
36+
In order to use the File Uploader field, your Amplify app must have an Amplify app with [Authentication](/[platform]/build-a-backend/auth/set-up-auth/) and [Storage](/[platform]/build-a-backend/storage/set-up-storage/) enabled.
3737

3838

3939
### How it works
4040

41-
The Storage Manager input will allow users to select from files on their local device and upload them to an S3 bucket. Storage Manager automatically connects to your S3 bucket added as part of Amplify Storage.
41+
The File Uploader input will allow users to select from files on their local device and upload them to an S3 bucket. File Uploader automatically connects to your S3 bucket added as part of Amplify Storage.
4242

43-
Files are uploaded immediately upon selection, and an S3 key is generated. By default, Storage Manager will generate a [unique S3 key](#unique-s3-keys) based on the file uploaded. On form submission, Storage Manager will return the S3 key of the uploaded file as a `String`.
43+
Files are uploaded immediately upon selection, and an S3 key is generated. By default, File Uploader will generate a [unique S3 key](#unique-s3-keys) based on the file uploaded. On form submission, File Uploader will return the S3 key of the uploaded file as a `String`.
4444

4545

4646
### Adding it to your form
4747

48-
To use the StorageManager component with an autogenerated form you will first need a data model that has an attribute that is either a string or an array of strings (`a.string().array()` in **amplify/data/resource.ts**). Then make sure to run `npx ampx generate forms` after you update your data model.
48+
To use the FileUploader component with an autogenerated form you will first need a data model that has an attribute that is either a string or an array of strings (`a.string().array()` in **amplify/data/resource.ts**). Then make sure to run `npx ampx generate forms` after you update your data model.
4949

50-
Then go into the generated form JSX file you want to use the StorageManager, for example: **ui-components/TodoCreateForm.jsx**. If your attribute is an array of strings, look for an `<ArrayField>` with `items={images}` (if your attribute name is "images"). Remove that entire component and replace it with the StorageManager component like this:
50+
Then go into the generated form JSX file you want to use the FileUploader, for example: **ui-components/TodoCreateForm.jsx**. If your attribute is an array of strings, look for an `<ArrayField>` with `items={images}` (if your attribute name is "images"). Remove that entire component and replace it with the FileUploader component like this:
5151

5252
```jsx title="ui-components/TodoCreateForm.jsx"
5353
// imports
54-
import { StorageManager } from "@aws-amplify/ui-react-storage";
54+
import { FileUploader } from "@aws-amplify/ui-react-storage";
5555
// import the processFile helper function which will create unique filenames based on the file contents
5656
import { processFile } from "./utils";
5757

5858
//...
59-
<StorageManager
59+
<FileUploader
6060
accessLevel="public"
6161
maxFileCount={10}
6262
acceptedFileTypes={['image/*']}
@@ -72,17 +72,17 @@ import { processFile } from "./utils";
7272
```
7373

7474

75-
If you want your data model to have only one image instead of an array of images, look for the `<TextField>` component with `value={image}` and replace it with the StorageManager component like this:
75+
If you want your data model to have only one image instead of an array of images, look for the `<TextField>` component with `value={image}` and replace it with the FileUploader component like this:
7676

7777

7878
```jsx title="ui-components/TodoCreateForm.jsx"
7979
// imports
80-
import { StorageManager } from "@aws-amplify/ui-react-storage";
80+
import { FileUploader } from "@aws-amplify/ui-react-storage";
8181
// import the processFile helper function which will create unique filenames based on the file contents
8282
import { processFile } from "./utils";
8383

8484
//...
85-
<StorageManager
85+
<FileUploader
8686
accessLevel="public"
8787
maxFileCount={1}
8888
acceptedFileTypes={['image/*']}
@@ -97,18 +97,18 @@ import { processFile } from "./utils";
9797
/>
9898
```
9999

100-
See the documentation for the [StorageManager](https://ui.docs.amplify.aws/react/connected-components/storage/storagemanager) for all configuration options.
100+
See the documentation for the [FileUploader](https://ui.docs.amplify.aws/react/connected-components/storage/fileuploader) for all configuration options.
101101

102102

103103
### Unique S3 keys
104104

105-
If files with identical S3 keys are uploaded to the same path, S3 will overwrite those files. To prevent accidental overwriting of files, Storage Manager generates a unique S3 key by hashing the _file contents_. Uploading different files with the same name will not overwrite the original file.
105+
If files with identical S3 keys are uploaded to the same path, S3 will overwrite those files. To prevent accidental overwriting of files, File Uploader generates a unique S3 key by hashing the _file contents_. Uploading different files with the same name will not overwrite the original file.
106106

107-
However, if a form submitter uploads two identical files to the same path - even with different file names - Storage Manager will prevent file duplication in your S3 bucket.
107+
However, if a form submitter uploads two identical files to the same path - even with different file names - File Uploader will prevent file duplication in your S3 bucket.
108108

109109
<Callout warning>
110110

111-
File overwriting only occurs for identical S3 keys _in the same path_. If the **File level access** for your Storage Manager is set to `private` or `protected`, identical files uploaded by separate users will be saved separately.
111+
File overwriting only occurs for identical S3 keys _in the same path_. If the **File level access** for your File Uploader is set to `private` or `protected`, identical files uploaded by separate users will be saved separately.
112112

113113
<br />
114114
If your **File level access** is set to `public`, identical files will overwrite

src/pages/gen1/[platform]/build-ui/formbuilder/customize/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Add form inputs to personalize the form to your use case. To add a form element:
5252

5353
Every input element in your form can be customized. Select a field in the form to open the configuration menu, where you can customize parts of the input, like its display label and placeholder.
5454

55-
Some form inputs have unique configurations, like **Storage Manager**. [Learn more about configuring special fields in the documentation](/gen1/[platform]/build-ui/formbuilder/special-inputs/).
55+
Some form inputs have unique configurations, like **File Uploader**. [Learn more about configuring special fields in the documentation](/gen1/[platform]/build-ui/formbuilder/special-inputs/).
5656

5757
## Reorder form inputs with drag and drop
5858

0 commit comments

Comments
 (0)