Repository navigation
SK-3326: Add file element (file upload) support to skyvault - #203
saileshwar-skyflow wants to merge 12 commits into
Conversation
…load File bodies can be large (up to the 32 MB single-file cap), and on a slow network streaming one can take longer than OkHttp's default 10s write/read timeout, failing an otherwise successful upload with a socket "timeout". Set the upload client's write/read timeouts to 0 (no per-operation cap) and keep only a modest connect timeout; a caller that wants a hard overall bound still sets FileUploadOptions.timeoutMs (callTimeout). Large uploads now run to completion instead of being cut off. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Streaming a multi-MB multipart body over HTTP/2 was reset mid-upload by the vault gateway with "stream was reset: PROTOCOL_ERROR" (an h2 RST_STREAM); the device logcat confirms the upload negotiates HTTP/2 (OkHttp applyAndAckSettings) and only multi-MB bodies are reset, while tiny single-frame uploads succeed. HTTP/1.1 has no stream multiplexing, so this failure mode cannot arise, and multiplexing offers nothing for a single large upload request. Pin the upload client to HTTP/1.1. 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. |
Promptless documentation updates
|
…e iOS SDK Match the file element's client-side validation to the other native SDK (and skyflow-js) so both platforms behave and read the same: - FileInputElement implements BaseElement -> public setError / resetError. - Validate on every selection change and show the error on the element (like a text field), not only when uploadFiles() runs. - Reject an over-count multi selection instead of truncating it. - App-facing (reported) messages no longer contain a file name and use the shared wording: "Invalid File Type.", "Invalid File Size", "No File Selected", "Invalid File Name. ...", "You can upload up to N files. ...". On-element messages may still name the file(s). - New FileValidationError (common) carries both message forms (display vs report); FileUploadValidator.validate() returns it instead of throwing per-rule errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
1 similar comment
|
✅ 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. |
Drop stripImageMetadata (CollectElementOptions) and the per-upload FileUploadOptions bag (timeoutMs + progressListener), along with its FileUploadProgressListener and CountingRequestBody, so the skyvault file element's public option surface matches the native iOS and JS SDKs. cancelFileUploads() and the file-upload client settings (no default socket timeouts, HTTP/1.1 pinning) are unchanged. Also drops the now unused androidx.exifinterface dependency and updates the README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
8cefe0b
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
1 similar comment
|
✅ 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. |
…tton Add an optional removeButtonStyles (Skyflow.Styles) to the file CollectElementInput constructor so apps can style the per-file remove (x) button — colour, background, corner radius, border, padding and font. Default null keeps the built-in compact x, so the change is additive. Layout (width/height/margin) is not applied, so the button stays compact and never expands to fill the file row. Also drop cross-SDK references from the file-element comments (explain the behaviour plainly instead) and document removeButtonStyles in the README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
1 similar comment
|
✅ 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. |
Summary
Brings the skyvault file element / file upload feature and its two follow-up fixes from the
skyvault-release/26.11.0internal-release branch intomain.This is the Android support for file upload (
POST /v2/vaults/{vaultID}/files/upload): a file collect element, single- and multi-file upload, client-side validation (type / size / count / name), optional image-metadata stripping, upload progress + cancellation, and optionalreturnFileMetadata.What's included
Functional changes (3 commits):
ce7f00a— SK-3326: Add file element support to skyvault (reviewed as SK-3326: Add file element support to skyvault #202 into the release branch) — the full feature, unit tests, sample app, and README.c80aecc— SK-3326: Don't impose OkHttp's default 10s socket timeouts on file upload (large/slow uploads were timing out).d88bafd— SK-3326: Pin file uploads to HTTP/1.1 to avoid HTTP/2 stream resets (stream was reset: PROTOCOL_ERRORseen on multi-MB multipart uploads; HTTP/1.1 has no stream multiplexing so that failure mode can't arise, and multiplexing buys nothing for a single large upload).Automated version bumps (3 commits — safe to squash at merge):
25f70a7,7d0be5e,18db5ce—[AUTOMATED] Internal Releasecommits that only moveskyvault/build.gradlemVersionName(final:1.27.0-dev.d88bafd).Testing
FileInputElementTest,FileUploadValidatorTest,ImageMetadataStripperTest.sdk-integration-tests, Sauce Labs / BLITZ,product=skyvault): 182 / 182 passing (run 46595628293). The newfileUploadNative.featurescenarios cover real uploads (returning askyflow_id), client-side validation, and file limits.Notes for reviewers
maincurrently sits atmVersionName = 1.27.0-dev.d837ad9; the automated bumps on this branch land1.27.0-dev.d88bafd. If you squash-merge, confirm the final version string.maxFileSizereject scenarios.🤖 Generated with Claude Code