Skip to content
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

chore(canary): add FileUploader to react canaries #5760

Merged
merged 3 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion build-system-tests/templates/components/react/cra/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
syncMessages,
} from 'aws-amplify/in-app-messaging';
import { AccountSettings, Authenticator, Text } from '@aws-amplify/ui-react';
import { StorageManager } from '@aws-amplify/ui-react-storage';
import { StorageManager, FileUploader } from '@aws-amplify/ui-react-storage';
import {
InAppMessageDisplay,
InAppMessagingProvider,
Expand Down Expand Up @@ -46,6 +46,24 @@ export default function Home() {
maxFileCount={1}
isResumable
/>
<StorageManager
acceptedFileTypes={['image/*']}
path="public/"
maxFileCount={1}
isResumable
/>
<FileUploader
acceptedFileTypes={['image/*']}
accessLevel="guest"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is the v5 version of the props, can we add v6 versions with path in this test as well for both FileUploader and StorageManager?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    <StorageManager
      acceptedFileTypes={['image/*']}
      path="public/"
      maxFileCount={1}
      isResumable
    />

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

maxFileCount={1}
isResumable
/>
<FileUploader
acceptedFileTypes={['image/*']}
path="public/"
maxFileCount={1}
isResumable
/>
<MapView
initialViewState={{
latitude: 37.8,
Expand Down
20 changes: 19 additions & 1 deletion build-system-tests/templates/components/react/next/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
syncMessages,
} from 'aws-amplify/in-app-messaging';
import { AccountSettings, Authenticator, Text } from '@aws-amplify/ui-react';
import { StorageManager } from '@aws-amplify/ui-react-storage';
import { StorageManager, FileUploader } from '@aws-amplify/ui-react-storage';
import {
InAppMessageDisplay,
InAppMessagingProvider,
Expand Down Expand Up @@ -46,6 +46,24 @@ export default function Home() {
maxFileCount={1}
isResumable
/>
<StorageManager
acceptedFileTypes={['image/*']}
path="public/"
maxFileCount={1}
isResumable
/>
<FileUploader
acceptedFileTypes={['image/*']}
accessLevel="guest"
maxFileCount={1}
isResumable
/>
<FileUploader
acceptedFileTypes={['image/*']}
path="public/"
maxFileCount={1}
isResumable
/>
<MapView
initialViewState={{
latitude: 37.8,
Expand Down
20 changes: 19 additions & 1 deletion build-system-tests/templates/components/react/vite/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
syncMessages,
} from 'aws-amplify/in-app-messaging';
import { AccountSettings, Authenticator, Text } from '@aws-amplify/ui-react';
import { StorageManager } from '@aws-amplify/ui-react-storage';
import { StorageManager, FileUploader } from '@aws-amplify/ui-react-storage';
import {
InAppMessageDisplay,
InAppMessagingProvider,
Expand Down Expand Up @@ -46,6 +46,24 @@ export default function Home() {
maxFileCount={1}
isResumable
/>
<StorageManager
acceptedFileTypes={['image/*']}
path="public/"
maxFileCount={1}
isResumable
/>
<FileUploader
acceptedFileTypes={['image/*']}
accessLevel="guest"
maxFileCount={1}
isResumable
/>
<FileUploader
acceptedFileTypes={['image/*']}
path="public/"
maxFileCount={1}
isResumable
/>
<MapView
initialViewState={{
latitude: 37.8,
Expand Down
Loading