diff --git a/src/formio/components/file.ts b/src/formio/components/file.ts index 3a47968..7c6cf43 100644 --- a/src/formio/components/file.ts +++ b/src/formio/components/file.ts @@ -82,8 +82,9 @@ export interface BaseFileComponentSchema HasValidation { type: 'file'; multiple?: boolean; - // (possibly) more-constrained existing formio properties + webcam: false; + options: {withCredentials: true}; storage: 'url'; url: string; file: FileUploadConfiguration; diff --git a/test-d/formio/components/file.test-d.ts b/test-d/formio/components/file.test-d.ts index 5ea70e9..33e44c5 100644 --- a/test-d/formio/components/file.test-d.ts +++ b/test-d/formio/components/file.test-d.ts @@ -26,6 +26,8 @@ expectAssignable({ type: 'file', key: 'someFile', label: 'Attachment', + webcam: false, + options: {withCredentials: true}, storage: 'url', url: '', file: { @@ -43,6 +45,8 @@ const explicitSingleUpload: FileComponentSchema = { type: 'file', key: 'someFile', label: 'Attachment', + webcam: false, + options: {withCredentials: true}, storage: 'url', url: '', file: { @@ -63,6 +67,8 @@ const explicitMultipleUpload: FileComponentSchema = { type: 'file', key: 'someFile', label: 'Attachment', + webcam: false, + options: {withCredentials: true}, storage: 'url', url: '', file: { @@ -83,6 +89,8 @@ const implicitSingleUpload: FileComponentSchema = { type: 'file', key: 'someFile', label: 'Attachment', + webcam: false, + options: {withCredentials: true}, storage: 'url', url: '', file: { @@ -106,6 +114,8 @@ expectAssignable({ key: 'someInput', label: 'Some input', // builder sets empty URL, backend dynamically makes this non-empty + webcam: false, + options: {withCredentials: true}, storage: 'url', url: '', file: { @@ -143,6 +153,8 @@ expectAssignable({ expectAssignable({ id: 'yejak', type: 'file', + webcam: false, + options: {withCredentials: true}, storage: 'url', url: '', // basic tab in builder form @@ -219,6 +231,8 @@ expectNotAssignable({ type: 'content', key: 'someFile', label: 'Attachment', + webcam: false, + options: {withCredentials: true}, storage: 'url', url: '', file: { @@ -235,6 +249,8 @@ expectNotAssignable({ type: 'file', key: 'someFile', label: 'Attachment', + webcam: false, + options: {withCredentials: true}, storage: 's3', // we only support url url: '', file: {