Layout - UploadBuilder
Layout.UploadBuilderDefine a UI file upload from a
Stream within a LayoutBuilder.Remarks
A Upload requires a writable
Stream, such as produced by a SourceBuilderExample
// use a BlobType stream
const stream = Stream(
"My Stream",
BlobType,
);
// create a upload in a layout
const layout = new LayoutBuilder("My Layout")
.upload("My Upload", builder => builder
.fromStream(stream)
)
.toTemplate()
Layout
constructor
• new UploadBuilder(name
, module
):
UploadBuilder
Define a UI Upload from a
Stream within a LayoutBuilder.Parameters
Name | Type |
---|---|
name | string |
module | ModulePath |
Returns
UploadBuilder
Remarks
A Upload is editable when defined from a writable
Stream, such as produced by a SourceBuilderExample
// use a StructType stream
const stream = Stream(
"My Stream",
BlobType,
);
// create a upload in a layout
const layout = new LayoutBuilder("My Layout")
.upload("My Upload", builder => builder
.fromStream(stream)
)
.toTemplate()
fromStream
▸ fromStream(stream
): UploadFinalizer
Define the
Stream to build a UploadBuilder within a LayoutBuilder.Type parameters
Name | Type |
---|---|
T | extends BlobType |
Parameters
Name | Type | Description |
---|---|---|
stream | Stream | the StructType Stream to build the table from |
Returns
UploadFinalizer
Example
// use a BlobType stream
const stream = Stream(
"My Stream",
BlobType,
);
// create a upload in a layout
const layout = new LayoutBuilder("My Layout")
.upload("My Upload", builder => builder
.fromStream(stream)
.inputs()
)
.toTemplate()