SK-2844 add max file size and max file count support in multi file input element#693
Merged
Conversation
saileshwar-skyflow
approved these changes
May 27, 2026
aadarsh-st
approved these changes
May 27, 2026
skyflow-bharti
added a commit
that referenced
this pull request
May 29, 2026
* SK-2844 add max file size and max file count support in multi file input element (#693) --------- Co-authored-by: skyflow-bharti <skyflow-bharti@users.noreply.github.com>
skyflow-bharti
added a commit
that referenced
this pull request
May 29, 2026
* SK-2844 add max file size and max file count support in multi file input element (#693) --------- Co-authored-by: skyflow-bharti <skyflow-bharti@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SK-2819: Add maxFileSize and maxFileCount options to MULTI_FILE_INPUT element
Adds two new configurable validation options for MULTI_FILE_INPUT elements, giving developers control over per-file size limits and the maximum number of files that can be selected in a single upload.
Why
The MULTI_FILE_INPUT element previously applied a hard-coded 32 MB size cap and had no limit on the number of files a user could select. There was no way for developers to enforce stricter limits per their product requirements (e.g., a 5 MB cap for profile pictures, or restricting to 2 files per upload). This change exposes maxFileSize and maxFileCount as first-class options on the element so developers can configure these constraints at creation time rather than re-implementing validation outside the SDK.
Goal
maxFileSize: number — validates each selected file against a configurable byte limit. Defaults to 32_000_000 (32 MB). Applies only to MULTI_FILE_INPUT; FILE_INPUT is unaffected.
maxFileCount: number — validates the total number of selected files against a configurable integer limit. Defaults to 4. Applies only to MULTI_FILE_INPUT.
Both options produce specific, user-friendly inline error messages:
Both exceeded simultaneously → "You can upload up to X files, each under Y MB."
Invalid option values (non-positive number, non-integer count) throw a SKYFLOW_ERROR_CODE.INVALID_POSITIVE_NUMBER_OPTIONS error at element creation time.