Repository navigation
SK-3326: Add file element support to skyvault - #202
Open
saileshwar-skyflow wants to merge 2 commits into
Open
saileshwar-skyflow wants to merge 2 commits into
saileshwar-skyflow wants to merge 2 commits into
Conversation
Adds a skyvault-only file-upload element (single and multiple) with native pickers, five selectable trigger layouts, upload to the vault, a sample, docs and unit tests. File types stay out of flowvault. SDK: - FileElementInput / FileElementOptions / FileElementType / FileSource - FileInputElement: per-file remove, five FileElementAppearance looks (FIELD, BUTTON, ICON, CARD, CUSTOM + openPicker()), buttonStyles - FilePicker: SAF documents, Photo Picker, camera (SDK FileProvider) - container.uploadFiles() and uploadFiles(metaData): direct upload and multi insert-then-upload, response aggregated as in skyflow-js - common/core/file: SelectedFile, FileUploadValidator, streamed FileUploadRequestBody (no disk copy); shared error codes/messages Sample: FileUploadActivity demoing every type, appearance and source. Docs: "Securely collecting files" section in skyvault README. Tests: FileUploadValidatorTest, FileInputElementTest (all green). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
✅ 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. |
The sample apps read local.properties (absent on CI) and have no root compileSdk, so including :samples:skyvault / :samples:flowvault made CI configure them and fail. Match main: build only :skyvault and :flowvault; the file-upload sample stays as reference source like the other samples. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
✅ 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. |
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.
What
Adds a skyvault-only file-upload element (single and multiple), aligned with the skyflow-js / iOS file-upload contract. File types stay out of flowvault's public surface.
Changes
SDK
FileElementInput/FileElementOptions/FileElementType(FILE_INPUT,MULTI_FILE_INPUT) /FileSource(FILES,PHOTOS,CAMERA)FileInputElement— per-file remove (✕), and five selectable trigger looks viaFileElementAppearance:FIELD,BUTTON,ICON,CARD,CUSTOM(app's own trigger →openPicker()), plusbuttonStylesFilePicker— SAF documents, Photo Picker, and camera (SDK's ownFileProvider; no runtime permission)container.uploadFiles(callback)anduploadFiles(metaData, callback)— direct upload and multi insert-then-upload; response aggregated as{ fileUploadResponse, errorResponse }(partial success supported)common/core/file:SelectedFile,FileUploadValidator(type / size / empty / name / count), streamedFileUploadRequestBody(no disk copy); shared error codes + messagesSample —
samples/skyvault→FileUploadActivitydemonstrating everyFileElementType,FileElementAppearanceandFileSource, with styled and default looks.Docs — new "Securely collecting files client-side" section in the skyvault README.
Tests —
FileUploadValidatorTestandFileInputElementTest(selection, limits, state, validation, per-appearance rendering).Verification
:skyvault:compileDebugKotlin+:flowvault:compileDebugKotlin— green:samples:skyvault:assembleDebug— green (FileProvider manifest merges):skyvault:testDebugUnitTest(new tests) — greenSecurity note
The boundary is the API, not an isolated process: the element exposes no getter for the bytes, Uri or file name (same model as a text field), but native Android can't hide a picked file from host app code that deliberately reads it — documented in the README.
🤖 Generated with Claude Code