Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## 1.0.1

### 2025-08-01

- Fix uploading files with content URIs by properly initializing Cursor.

### 2025-06-26

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.ionic.libs</groupId>
<artifactId>ionfiletransfer-android</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ internal class IONFLTRFileHelper(val contentResolver: ContentResolver) {
fun getFileToUploadInfo(filePath: String): FileToUploadInfo {
return if (filePath.startsWith("content://")) {
val uri = filePath.toUri()
val cursor = contentResolver.query(uri, null, null, null, null)
?: throw IONFLTRException.FileDoesNotExist()
val cursor = contentResolver.query(uri, null, null, null, null)
if (cursor?.moveToFirst() != true) {
throw IONFLTRException.FileDoesNotExist()
}
cursor.use {
val fileName = getNameForContentUri(cursor)
?: throw IONFLTRException.FileDoesNotExist()
Expand Down
Loading