Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get Tag in the result or progress streams #107

Closed
AhmedNourJamalElDin opened this issue Oct 9, 2020 · 7 comments
Closed

How to get Tag in the result or progress streams #107

AhmedNourJamalElDin opened this issue Oct 9, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@AhmedNourJamalElDin
Copy link

Hello,

I am using version 2.0.0-beta.3 and I would like to use the tag attribute.
As stated in the documentation,

tag: 'my tag', // custom tag which is returned in result/progress

I should be able to access it, and I have tried something like this:

uploader.result.listen((event) {
       final tag = event.tag;
});

but it didn't work because UploadTaskResponse has no attribute called tag.

so the question is how to access it?

@ened
Copy link
Collaborator

ened commented Dec 26, 2020

@AhmedNourJamalElDin tag is currently used internally only - but I will try to reactivate it. It is likely to become a list of tags which you can assign.

@ened ened added the enhancement New feature or request label Dec 26, 2020
@AhmedNourJamalElDin
Copy link
Author

Thanks for response.
I am no longer uploading files in background i.e. I'm not using this package at thr moment.

Accordingly, I will close this issue.

@aaqibismail
Copy link

aaqibismail commented Jan 25, 2021

Will it be possible to activate tag or a custom attribute of some sort in future versions? The main reason I want it is because I want to watch the show the progress of potentially multiple uploads to a user, but for now it's impossible to do so because I cannot determine which UploadProgress corresponds to the one shown in the UI. Thank you for the help.

Edit:
Never mind, I just realized enqueue gives you back the taskID anyways. My mistake.

@ened
Copy link
Collaborator

ened commented Jan 27, 2021

@aaqibism yes - that is probably a good way.

Are you interested in documenting your approach in the Wiki? Others may find it helpful.

@aaqibismail
Copy link

Sure, that sounds interesting. Although I’m not entirely if I chose the best solution for communicating between isolates. I ended up using a Send and Receive port as I found most reliable.

@ened
Copy link
Collaborator

ened commented Jan 27, 2021

Send & Receive Port is a good way. You can use IsolateNameServer to register by name etc. There are a few caveats like timeouts, receiver gone, response missing etc..

@aaqibismail
Copy link

@ened Would you still like me to document on the Wiki or no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants