Page MenuHomeSealhub

multiple-files.ts
No OneTemporary

Authored By
Unknown
Size
740 B
Referenced Files
None
Subscribers
None

multiple-files.ts

import { Context } from "koa";
import { FieldTypes as SealiousFieldTypes } from "sealious";
import { FormField } from "./field.js";
import { MultipleFiles as MultipleFilesControl } from "../controls/multiple-files.js";
export class MultipleFiles extends FormField<
false,
undefined,
MultipleFilesControl
> {
constructor(
public collection_field: SealiousFieldTypes.ReverseSingleReference,
public getItemId: (ctx: Context) => Promise<string> | string
) {
super(false);
}
getEmptyValue() {
return undefined;
}
async parse() {
return <const>{ parsed_value: undefined, parsable: true, error: null }; // the control is supposed to do the heavy lifting here
}
getControl() {
return new MultipleFilesControl(this);
}
}

File Metadata

Mime Type
application/javascript
Expires
Fri, Nov 27, 16:44 (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1198073
Default Alt Text
multiple-files.ts (740 B)

Event Timeline