Release/26.5.1#694
Conversation
…put element (#693) * SK-2844 add max file size and max file count support in multi file input element
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
1 similar comment
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
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.