Skip to content
v2.277.0

FileUploaderFieldConfigProperty Struct ​

Describes the configuration for the file uploader field.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_amplifyuibuilder as amplifyuibuilder } from 'aws-cdk-lib';
const fileUploaderFieldConfigProperty: amplifyuibuilder.CfnForm.FileUploaderFieldConfigProperty = {
  acceptedFileTypes: ['acceptedFileTypes'],
  accessLevel: 'accessLevel',

  // the properties below are optional
  isResumable: false,
  maxFileCount: 123,
  maxSize: 123,
  showThumbnails: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_amplifyuibuilder as amplifyuibuilder

file_uploader_field_config_property = amplifyuibuilder.CfnForm.FileUploaderFieldConfigProperty(
    accepted_file_types=["acceptedFileTypes"],
    access_level="accessLevel",

    # the properties below are optional
    is_resumable=False,
    max_file_count=123,
    max_size=123,
    show_thumbnails=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.amplifyuibuilder.*;

FileUploaderFieldConfigProperty fileUploaderFieldConfigProperty = FileUploaderFieldConfigProperty.builder()
        .acceptedFileTypes(List.of("acceptedFileTypes"))
        .accessLevel("accessLevel")

        // the properties below are optional
        .isResumable(false)
        .maxFileCount(123)
        .maxSize(123)
        .showThumbnails(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AmplifyUIBuilder;

var fileUploaderFieldConfigProperty = new FileUploaderFieldConfigProperty {
    AcceptedFileTypes = new [] { "acceptedFileTypes" },
    AccessLevel = "accessLevel",

    // the properties below are optional
    IsResumable = false,
    MaxFileCount = 123,
    MaxSize = 123,
    ShowThumbnails = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

fileUploaderFieldConfigProperty := &FileUploaderFieldConfigProperty{
	AcceptedFileTypes: []*string{
		jsii.String("acceptedFileTypes"),
	},
	AccessLevel: jsii.String("accessLevel"),

	// the properties below are optional
	IsResumable: jsii.Boolean(false),
	MaxFileCount: jsii.Number(123),
	MaxSize: jsii.Number(123),
	ShowThumbnails: jsii.Boolean(false),
}

Properties ​

acceptedFileTypesstring[]accepted_file_typestyping.List[str]acceptedFileTypesList<String>AcceptedFileTypesstring[]AcceptedFileTypes*[]*stringrequired#
The file types that are allowed to be uploaded by the file uploader.

Provide this information in an array of strings specifying the valid file extensions.

accessLevelstringaccess_levelstraccessLevelStringAccessLevelstringAccessLevel*stringrequired#
The access level to assign to the uploaded files in the Amazon S3 bucket where they are stored.
notes

The valid values for this property are private , protected , or public . For detailed information about the permissions associated with each access level, see File access levels in the Amplify documentation .

isResumableoptionalboolean | IResolvableis_resumableoptionaltyping.Union[bool, IResolvable]isResumableoptionalBooleanIsResumableoptionalboolIsResumableoptionalinterface{}#
Allows the file upload operation to be paused and resumed. The default value is `false` .

When isResumable is set to true , the file uploader uses a multipart upload to break the files into chunks before upload. The progress of the upload isn't continuous, because the file uploader uploads a chunk at a time.

maxFileCountoptionalnumbermax_file_countoptionalint | floatmaxFileCountoptionalNumberMaxFileCountoptionaldoubleMaxFileCountoptional*float64#
Specifies the maximum number of files that can be selected to upload.

The default value is an unlimited number of files.

maxSizeoptionalnumbermax_sizeoptionalint | floatmaxSizeoptionalNumberMaxSizeoptionaldoubleMaxSizeoptional*float64#
The maximum file size in bytes that the file uploader will accept.

The default value is an unlimited file size.

showThumbnailsoptionalboolean | IResolvableshow_thumbnailsoptionaltyping.Union[bool, IResolvable]showThumbnailsoptionalBooleanShowThumbnailsoptionalboolShowThumbnailsoptionalinterface{}#
Specifies whether to display or hide the image preview after selecting a file for upload.

The default value is true to display the image preview.