Skip to content

SK-3321 add file element support in skyvault sdk - #340

Open
skyflow-bharti wants to merge 1 commit into
mainfrom
SK-3321-add-file-element-support-in-i-os-skyvault-sdk
Open

skyflow-bharti wants to merge 1 commit into
mainfrom
SK-3321-add-file-element-support-in-i-os-skyvault-sdk

Conversation

@skyflow-bharti

Copy link
Copy Markdown
Collaborator

What this PR implements

File elements in the SkyVault (Skyflow) iOS SDK: FILE_INPUT (single file) and MULTI_FILE_INPUT (multiple files), as in skyflow-js.
Creating an element: container.create(fileInput: CollectElementInput(table:column:type:appearance:), options: CollectElementOptions(...))

Two layouts:

.FIELD (default) is a bordered box with "Choose File" and the selected file.
.CUSTOM draws no SDK button. The app uses its own button and calls openPicker().

File sources: Files app, Photos library and camera.

File options:

required, allowedFileType, blockEmptyFiles, preserveFileName, returnFileMetadata, maxFileSize, maxFileCount, sources.
Validation on the device: file type, size, count, empty files and file name. Archive and executable files are always blocked.

Upload:

container.uploadFiles(callback:) uploads each file as its own record to /v2/vaults/{vaultID}/files/upload. Failed files stay selected so the user can retry.
Element API: on(eventName:), setError, resetError, clearValue, unmount, openPicker().

Privacy:

the app never gets file bytes, paths or names, only fileCount, isValid and isEmpty. Temporary copies the SDK makes are deleted after use.
Tests: a new skyflow-iOS-fileTests target with 167 tests, all passing.

@github-actions

Copy link
Copy Markdown

✅ Gitleaks Findings: No secrets detected. Safe to proceed!

@promptless

promptless Bot commented Nov 27, 2026

Copy link
Copy Markdown

Promptless documentation updates

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.

1 participant