Skip to content

DEV-1545: fix Fliplet.Media.capture() return type doc (File web / Blob native)#287

Closed
farhantariq12b wants to merge 3 commits into
masterfrom
fix/DEV-1545-file-blob-doc
Closed

DEV-1545: fix Fliplet.Media.capture() return type doc (File web / Blob native)#287
farhantariq12b wants to merge 3 commits into
masterfrom
fix/DEV-1545-file-blob-doc

Conversation

@farhantariq12b

@farhantariq12b farhantariq12b commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

JIRA Issue

https://weboo.atlassian.net/browse/DEV-1545

Summary

Corrects the published Fliplet.Media.capture() doc, which promised the resolved value is always a File. On native, cordova-plugin-file overrides window.File, so the implementation (see fliplet-api PR #8369) resolves with a Blob tagged with .name/.type/.lastModified instead of a real File there — a genuine native File can't be constructed. Web is unaffected; it already resolves with a real File.

Raised by the automated reviewer (Arpanexe) on fliplet-api PR #8369 as a doc/implementation contract mismatch.

Changes

  • docs/API/v3/media.md — capture() return type documented as File (web) / Blob (native); both work directly with Files.upload() and URL.createObjectURL().
  • docs/.well-known/llms-full.txt — mirrored the same wording (compiled doc bundle).

Scoped to just these two files — an earlier commit also regenerated the full doc build (which incidentally pulled in an unrelated pre-existing Android changelog sync + a catalog timestamp bump); reverted that so this PR only carries the capture() wording fix.

Verification

cd docs && npm run test:unit (163/163 pass) and npm run check:docs --strict (203 docs, 46 V3 libraries, no catalog uniqueness violations) both green against this change.

Risk Assessment

  • Risk Level: LOW — documentation wording only, no code change
  • Files Modified: 2

🤖 Generated with Claude Code

…b native)

Raised on fliplet-api PR #8369 (Arpanexe review): the doc promised capture()
resolves with a File, but on native it can't — cordova-plugin-file overrides
window.File, so the native implementation returns a Blob tagged with
.name/.type/.lastModified instead. Clarify the return type per platform;
both still work directly with Files.upload() and URL.createObjectURL().

Co-Authored-By: Claude <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploying fliplet-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2e054e9
Status: ✅  Deploy successful!
Preview URL: https://792e9ea2.fliplet-cli.pages.dev
Branch Preview URL: https://fix-dev-1545-file-blob-doc.fliplet-cli.pages.dev

View logs

Ran the actual pipeline instead of hand-patching the derived files:

  cd docs && npm run test:unit && npm run check:docs && npm run check:v3-catalog

- test:unit: 163/163 pass
- check:docs --strict: 203 docs indexed, 46 V3 libraries, no catalog
  uniqueness violations
- check:v3-catalog: 1 pre-existing error + 25 pre-existing warnings, none
  related to fliplet-media/capture() — unrelated drift already on master
  (e.g. "fliplet-service-worker" naming), out of scope here

llms-full.txt also picked up an unrelated native-framework changelog update
(Android 6.4.4 -> 6.4.7) that was already merged to master's source doc but
never re-synced into this compiled bundle — a pre-existing staleness the
regen fixes as a side effect. My hand-edit of the capture() paragraph in the
prior commit was byte-identical to what the generator produces.

Co-Authored-By: Claude <noreply@anthropic.com>
galisufyan-327
galisufyan-327 previously approved these changes Jul 16, 2026
@farhantariq12b

Copy link
Copy Markdown
Contributor Author

Closing alongside fliplet-api #8369 — DEV-1545 is back in To Do and being redesigned.

This PR documented the File (web) / Blob (native) return-type nuance of the client-side capture() implementation. That implementation is being replaced: WebKit has no canvas WebP encoder, so the client can never guarantee WebP on Apple, and the WebP guarantee is moving server-side to the upload endpoint. The return-type wording will be rewritten against the new design rather than patched here.

Superseded, not rejected — the underlying finding (docs promised a File the native path couldn't deliver) was correct and will be reflected in the new docs.

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.

2 participants