Feature #14524
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>
commandInput={input}
component={FileInputComponent}
format={format}
- parse={(file: CollectionFile): File => ({
- class: CWLType.FILE,
- location: `keep:${file.id}`,
- basename: file.name,
- })}
+ parse={parse}
validate={[
isRequiredInput(input)
? (file?: File) => file ? undefined : ERROR_MESSAGE
const format = (value?: File) => value ? value.basename : '';
+const parse = (file: CollectionFile): File => ({
+ class: CWLType.FILE,
+ location: `keep:${file.id}`,
+ basename: file.name,
+});
+
interface FileInputComponentState {
open: boolean;
file?: CollectionFile;