Skip to content

SK-3326: Add file element (file upload) support to skyvault - #203

Open
saileshwar-skyflow wants to merge 12 commits into
mainfrom
skyvault-release/26.11.0
Open

saileshwar-skyflow wants to merge 12 commits into
mainfrom
skyvault-release/26.11.0

Conversation

@saileshwar-skyflow

Copy link
Copy Markdown
Collaborator

Summary

Brings the skyvault file element / file upload feature and its two follow-up fixes from the skyvault-release/26.11.0 internal-release branch into main.

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 optional returnFileMetadata.

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_ERROR seen 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 Release commits that only move skyvault/build.gradle mVersionName (final: 1.27.0-dev.d88bafd).

Testing

  • SDK unit tests: FileInputElementTest, FileUploadValidatorTest, ImageMetadataStripperTest.
  • E2E (sdk-integration-tests, Sauce Labs / BLITZ, product=skyvault): 182 / 182 passing (run 46595628293). The new fileUploadNative.feature scenarios cover real uploads (returning a skyflow_id), client-side validation, and file limits.

Notes for reviewers

  • main currently sits at mVersionName = 1.27.0-dev.d837ad9; the automated bumps on this branch land 1.27.0-dev.d88bafd. If you squash-merge, confirm the final version string.
  • Multi-MB real-upload e2e coverage is intentionally omitted: the BLITZ vault gateway resets the connection partway through a multi-MB upload (reproduced over both HTTP/2 and HTTP/1.1 — a server/env limit, not an SDK bug). Worth a separate look by the vault/gateway team. Large-file handling is still covered client-side via maxFileSize reject scenarios.

🤖 Generated with Claude Code

saileshwar-skyflow and others added 6 commits November 30, 2026 21:31
…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>
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@promptless

promptless Bot commented Dec 1, 2026

Copy link
Copy Markdown

Promptless documentation updates

saileshwar-skyflow and others added 2 commits December 1, 2026 17:04
…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>
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

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

1 similar comment
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

1 similar comment
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

aadarsh-st
aadarsh-st previously approved these changes Dec 1, 2026
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>
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

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

1 similar comment
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

1 similar comment
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

saileshwar-skyflow and others added 2 commits December 1, 2026 23:54
…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>
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

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

1 similar comment
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

1 similar comment
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

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.

3 participants