Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Storing metadata in a download task #119

Open
richardwu opened this issue Sep 2, 2021 · 1 comment
Open

Storing metadata in a download task #119

richardwu opened this issue Sep 2, 2021 · 1 comment

Comments

@richardwu
Copy link

richardwu commented Sep 2, 2021

Is this a bug report, a feature request, or a question?

Feature request

Currently when a task is backgrounded and the app is restarted, we have access to the DownloadTask object. It seems like the only "state" that is stored from when the task was first initiated is the id.

I would like to store other metadata that I can reference to when the task is re-constituted on e.g., app restart (concretely, metadata that I can use to mark something as "downloaded").

It would also be nice to be able to access the URI and destination of the download task. There doesn't seem to be a public member to access such info currently.

My current hack is to use the id field as a serialization medium, or to use local storage to store the metadata myself.

@Timo-Linde
Copy link

Hello there, i like this feature request. Iam using exactly the same hack with string serialization on the id field.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants