TLExternalContentProps

See source code
Table of contents
interface TLExternalContentProps {}

Properties

acceptedImageMimeTypes

optional

The mime types of images that are allowed to be handled. When passed to the Tldraw component, this also reconfigures the default ImageAssetUtil to only accept files matching these types. If you only want to accept a subset of image types and want to additionally block videos, pass acceptedVideoMimeTypes={[]}. A file is accepted if its MIME type is in this list, in acceptedVideoMimeTypes, or if any registered asset util accepts it.

acceptedImageMimeTypes?: readonly string[];

acceptedVideoMimeTypes

optional

The mime types of videos that are allowed to be handled. When passed to the Tldraw component, this also reconfigures the default VideoAssetUtil to only accept files matching these types. A file is accepted if its MIME type is in this list, in acceptedImageMimeTypes, or if any registered asset util accepts it.

acceptedVideoMimeTypes?: readonly string[];

maxAssetSize

optional

The maximum size (in bytes) of an asset. Assets larger than this will be rejected. Defaults to 10mb (10 * 1024 * 1024).

maxAssetSize?: number;

maxImageDimension

optional

The maximum dimension (width or height) of an image. Images larger than this will be rescaled to fit. Defaults to infinity.

maxImageDimension?: number;

Prev
TLElbowArrowInfo
Next
TLScribbleOverlay