Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement type definition for file upload component #15

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

sergei-maertens
Copy link
Member

@sergei-maertens sergei-maertens commented Oct 16, 2023

Partly closes #2

This one is special, even in the case for 'multiple: false', the value is an array with only a single allowed item.

upstream Form.io file component allows many more upload targets, but we only support uploading to our own backend API. The upload configuration is generated and set dynamically by the backend, so that host names are not persisted in the JSON configuration.

Mostly describes the base schema and how a single file upload looks
like, i.e. what data is chucked over the wire when submitting the
form.
@sergei-maertens sergei-maertens force-pushed the feature/2-file-component-type branch from 4a8916c to f870581 Compare October 16, 2023 17:21
Incorporate the configuration for the file uploads in the type.

Added annotations because many of these are dynamically set
by the backend or the calculated as part of the form builder
form.
@sergei-maertens sergei-maertens force-pushed the feature/2-file-component-type branch from f870581 to 594f1e8 Compare October 17, 2023 16:06
@sergei-maertens sergei-maertens marked this pull request as ready for review October 17, 2023 16:06
@vaszig vaszig self-assigned this Oct 18, 2023
Copy link
Contributor

@vaszig vaszig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor typos..

src/formio/components/file.ts Outdated Show resolved Hide resolved
src/formio/components/file.ts Outdated Show resolved Hide resolved
src/formio/components/file.ts Show resolved Hide resolved
src/formio/components/file.ts Outdated Show resolved Hide resolved
@sergei-maertens sergei-maertens merged commit 438e62d into main Oct 18, 2023
6 checks passed
@sergei-maertens sergei-maertens deleted the feature/2-file-component-type branch October 30, 2023 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export Formio Typescript types
2 participants