appwrite / appwrite/sdk-for-flutter

🐛 Bug Report: downloading videos with flutter_downloader package is failing

Open
#201 2 comments 0 reactions 1 assignee Claimed by @stnguyen90 View on GitHub
bug
Dominant language
Dart
Stars
418
Forks
150
Avg merge
1h 23m
Merged PRs (30d)
3

Description

### 👟 Reproduction steps

I am using flutter_downloader plugin to download storage files, but it is failing with following error:
`flutter: Callback on UI isolate: task (taskid) is in status (DownloadTaskStatus.failed) and process (-1)`

i guess it is because of storage file url. I tried with following url:
`'${Constants.apiEndPoint}/storage/buckets/${Constants.moviesBucketId}/files/$movieFileId/view?project=${Constants.projectId}'`

`'${Constants.apiEndPoint}/storage/buckets/${Constants.moviesBucketId}/files/$movieFileId/download?project=${Constants.projectId}'`

`'${Constants.apiEndPoint}/storage/buckets/${Constants.moviesBucketId}/files/$movieFileId/preview?project=${Constants.projectId}'`

### 👍 Expected behavior

i should be able to get correct url to download videos with flutter_downloader plugin without any problems.

### 👎 Actual Behavior
on ios, it is not downloading sometimes. and giving following issue:
`Callback on UI isolate: task (taskid) is in status (DownloadTaskStatus.failed) and process (-1)`
on android, progress is going to negative(progress<0), as above error message. but successfully downloaded.

### 🎲 Appwrite version

Version 2.0.x

### 💻 Operating system

Linux

### 🧱 Your Environment

flutter 3.19.0
appwrite: ^12.0.3
flutter_downloader: ^1.11.7

### 👀 Have you spent some time to check if this issue has been raised before?

- [X] I checked and didn't find similar issue

### 🏢 Have you read the Code of Conduct?

- [X] I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)

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.