Skip to content

Commit a6bb004

Browse files
Version Packages (#6574)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 2ce7279 commit a6bb004

File tree

11 files changed

+68
-61
lines changed

11 files changed

+68
-61
lines changed

.changeset/happy-windows-grow.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/selfish-humans-rest.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"dependencies": {
2727
"@aws-amplify/ui-react": "6.11.2",
28-
"@aws-amplify/ui-react-storage": "3.10.3",
28+
"@aws-amplify/ui-react-storage": "3.11.0",
2929
"@docsearch/react": "3",
3030
"@mdx-js/loader": "^2.1.0",
3131
"@mdx-js/mdx": "^2.1.0",

examples/next-app-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@aws-amplify/ui-react": "6.11.2",
13-
"@aws-amplify/ui-react-storage": "3.10.3",
13+
"@aws-amplify/ui-react-storage": "3.11.0",
1414
"react": "^18.3.0",
1515
"next": "^14.2.25",
1616
"react-dom": "^18",

examples/next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@aws-amplify/ui-react-geo": "^2.2.9",
1616
"@aws-amplify/ui-react-liveness": "^3.3.9",
1717
"@aws-amplify/ui-react-notifications": "^2.2.9",
18-
"@aws-amplify/ui-react-storage": "^3.10.3",
18+
"@aws-amplify/ui-react-storage": "^3.11.0",
1919
"@aws-sdk/credential-providers": "^3.370.0",
2020
"next": "^14.2.25",
2121
"next-global-css": "^1.1.1",

examples/react-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@aws-amplify/ui-react": "6.11.2",
14-
"@aws-amplify/ui-react-storage": "3.10.3",
14+
"@aws-amplify/ui-react-storage": "3.11.0",
1515
"react": "^18.3.1",
1616
"react-dom": "^18.3.1",
1717
"react-router-dom": "^7.5.2"

packages/react-storage/CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,58 @@
11
# @aws-amplify/ui-react-storage
22

3+
## 3.11.0
4+
5+
### Minor Changes
6+
7+
- [#6575](https://github.com/aws-amplify/amplify-ui/pull/6575) [`a004c2f1b9dc74075515a784edb1ee6ce2485602`](https://github.com/aws-amplify/amplify-ui/commit/a004c2f1b9dc74075515a784edb1ee6ce2485602) Thanks [@tiffanynwyeung](https://github.com/tiffanynwyeung)! - feat(storage-browser): add custom file validation and options config
8+
9+
**Add custom file validation**
10+
11+
```tsx
12+
import React from 'react';
13+
import { createStorageBrowser } from '@aws-amplify/ui-react-storage/browser';
14+
import '@aws-amplify/ui-react-storage/styles.css';
15+
16+
const MAX_FILE_SIZE = 1000 * 1000; // 1 MB
17+
18+
const customValidateFile = (file: File) => {
19+
const isValidSize = file.size <= MAX_FILE_SIZE;
20+
const isValidType = file.type.includes('image');
21+
return isValidSize && isValidType;
22+
};
23+
24+
const { StorageBrowser } = createStorageBrowser({
25+
// ...config goes here...
26+
options: {
27+
validateFile: customValidateFile,
28+
},
29+
});
30+
31+
export default function Example() {
32+
return (
33+
<StorageBrowser
34+
displayText={{
35+
UploadView: {
36+
getFilesValidationMessage: (data) => {
37+
const invalidFileNames = data?.invalidFiles?.map(
38+
({ file }) => file.name
39+
);
40+
return {
41+
content: `Only image files that are 1 MB or smaller are accepted. Invalid files: ${invalidFileNames}`,
42+
type: 'error',
43+
};
44+
},
45+
},
46+
}}
47+
/>
48+
);
49+
}
50+
```
51+
52+
### Patch Changes
53+
54+
- [#6572](https://github.com/aws-amplify/amplify-ui/pull/6572) [`02cb81b87d8b59cef5e7b582b8a1b60e217c780e`](https://github.com/aws-amplify/amplify-ui/commit/02cb81b87d8b59cef5e7b582b8a1b60e217c780e) Thanks [@ashika112](https://github.com/ashika112)! - chore(StorageBrowser) : Generalize table resolver for default actions
55+
356
## 3.10.3
457

558
### Patch Changes

packages/react-storage/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-amplify/ui-react-storage",
3-
"version": "3.10.3",
3+
"version": "3.11.0",
44
"main": "dist/index.js",
55
"module": "dist/esm/index.mjs",
66
"exports": {

packages/react-storage/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '3.10.3';
1+
export const VERSION = '3.11.0';

packages/test-utils/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @aws-amplify/ui-test-utils
22

3+
## 0.0.6
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`02cb81b87d8b59cef5e7b582b8a1b60e217c780e`](https://github.com/aws-amplify/amplify-ui/commit/02cb81b87d8b59cef5e7b582b8a1b60e217c780e), [`a004c2f1b9dc74075515a784edb1ee6ce2485602`](https://github.com/aws-amplify/amplify-ui/commit/a004c2f1b9dc74075515a784edb1ee6ce2485602)]:
8+
- @aws-amplify/ui-react-storage@3.11.0
9+
310
## 0.0.5
411

512
### Patch Changes

0 commit comments

Comments
 (0)