Skip to content

[MOO-2482]: File System APIs for getFileSize and writeChunk - #66

Open
MxKevinBeqo wants to merge 9 commits into
mainfrom
moo/MOO-2482-resumable-download-apis
Open

MxKevinBeqo wants to merge 9 commits into
mainfrom
moo/MOO-2482-resumable-download-apis

Conversation

@MxKevinBeqo

Copy link
Copy Markdown
Contributor

This PR adds 2 new file system APIs to to get the size of a file and the perform chunked writing via offset (required for 'pause-resume'-capable functionalities).

@MxKevinBeqo MxKevinBeqo self-assigned this Sep 15, 2026
@MxKevinBeqo MxKevinBeqo added the enhancement New feature or request label Sep 15, 2026
@YogendraShelke

Copy link
Copy Markdown
Collaborator

Rebasing should fix the Android build issue.

@MxKevinBeqo
MxKevinBeqo force-pushed the moo/MOO-2482-resumable-download-apis branch from 2a6f536 to 79aa922 Compare September 28, 2026 11:38
Comment thread android/src/main/java/com/mendix/mendixnative/react/fs/FileBackend.kt Outdated
Comment thread src/file-system/index.ts Outdated
Comment thread src/file-system/index.ts Outdated
Comment thread ios/Modules/NativeFsModule/NativeFsModule.swift Outdated
Comment thread ios/Modules/NativeFsModule/NativeFsModule.swift Outdated
MxKevinBeqo and others added 3 commits October 7, 2026 10:47
Previously getFileSize resolved 0 for a non-existent file and when the
size attribute could not be read, making a missing file indistinguishable
from an empty one. It now rejects with ERROR_READ_FAILED on both platforms.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Instead of overloading save and writeChunk to accept BlobData | string,
add saveBase64 and writeChunkBase64 to NativeFileSystem. save and
writeChunk accept a blob only again.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
With encryption enabled, saveBase64 goes through the regular save path and
the stored file is larger than the payload on Android, so asserting on
getFileSize failed. Read the file back with readAsDataURL instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants