Skip to content

Conversation

@OS-pedrogustavobilro
Copy link
Contributor

Description

Reported in ionic-team/capacitor-file-transfer#9, a capacitor plugin was returning a content:// URI, and the plugin was returning an error, that was basically due to the way file properties were being retrieved with android.database.Cursor.

The fix involved correctly initializing the Cursor by calling moveToFirst before getting any specific properties from it.

Type of changes

  • Fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Refactor (cosmetic changes)
  • Breaking change (change that would cause existing functionality to not work as expected)

Checklist

  • CHANGELOG.md file is correctly updated
  • Changes require an update to the documentation
    • Documentation has been updated accordingly

@OS-pedrogustavobilro OS-pedrogustavobilro requested a review from a team August 1, 2025 09:48
@OS-pedrogustavobilro OS-pedrogustavobilro self-assigned this Aug 1, 2025
@OS-pedrogustavobilro OS-pedrogustavobilro merged commit 48ec705 into main Aug 1, 2025
1 check passed
@OS-pedrogustavobilro OS-pedrogustavobilro deleted the fix/content-uri-upload branch August 1, 2025 13:03
OS-pedrogustavobilro added a commit to ionic-team/capacitor-file-transfer that referenced this pull request Aug 1, 2025
OS-pedrogustavobilro added a commit to ionic-team/capacitor-file-transfer that referenced this pull request Aug 5, 2025
* fix(android): upload with content URIs"

fix in native library version 1.0

References: ionic-team/ion-android-filetransfer#9

* chore: simplify example app
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