ionic-team / ionic-team/capacitor-file-transfer

FileTransfer.downloadFile should make response headers available to JS

Open
#61 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11
Forks
10
PR merge metrics
No merged PRs in 30d

Description

## Feature Request

### Plugin

`FileTransfer` plugin

### Description

After downloading a file, I need to access certain information about it from the response headers.
Currently, the response object is created like this (on Android):

```kt
val response = JSObject().apply {
put("path", filePath)
}
call.resolve(response)
```

in the same scope, a `Map>?` is accessible via `result.data.headers`, which I would like the response object to contain.

### Platform(s)

Android, iOS

### Preferred Solution

Add a `headers` member to the response object of `downloadFile`, which contains the response headers.

### Alternatives

N/A

### Additional Context

N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.