MCPcopy Create free account
hub / github.com/cloudconvert/cloudconvert-cli / normalizeInputParameterFiles

Function normalizeInputParameterFiles

src/job.ts:607–617  ·  view source on GitHub ↗
(parameterName: string, value: unknown)

Source from the content-addressed store, hash-verified

605}
606
607function normalizeInputParameterFiles(parameterName: string, value: unknown): string | string[] {
608 if (typeof value === 'string') {
609 return value;
610 }
611
612 if (Array.isArray(value) && value.every(item => typeof item === 'string')) {
613 return value;
614 }
615
616 throw new Error(`Parameter ${parameterName} is an input file parameter and must be a file path.`);
617}
618
619function getSecondaryUploadTaskName(parameterName: string, index: number): string {
620 return `upload-${parameterName}-${index}`;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected