Skip to content

Fix not removing readers in file upload example#2055

Merged
siku2 merged 1 commit into
yewstack:masterfrom
mc1098:fix-upload-example
Sep 21, 2021
Merged

Fix not removing readers in file upload example#2055
siku2 merged 1 commit into
yewstack:masterfrom
mc1098:fix-upload-example

Conversation

@mc1098
Copy link
Copy Markdown
Contributor

@mc1098 mc1098 commented Sep 14, 2021

Description

A bit of deja vu for you but this fixes the same issue as #2054 but on master :)

In the file upload example we store the FileReaders while reading from
the uploaded file but once read we never remove them from the vec.

Closes #2035

Checklist

  • I have run cargo make pr-flow
  • I have reviewed my own code
  • I have added tests

In the file upload example we store the FileReaders while reading from
the uploaded file but once read we never remove them from the vec.
@mc1098 mc1098 changed the title Fixes not removing readers in file upload example Fix not removing readers in file upload example Sep 14, 2021
@allsey87
Copy link
Copy Markdown

Definitely better than just indefinitely leaving them in a Vec<_>, but I am thinking that this could cause problems if one were to try uploading a directory containing multiple FILENAME.EXT, that is, in different subdirectories...

@mc1098
Copy link
Copy Markdown
Contributor Author

mc1098 commented Sep 15, 2021

My understanding is that you can't select directories without the webkitdirectory attribute which is not standard. So I think this is okay, though it was interesting because I didn't even know about webkitdirectory 😅. If / when it becomes standard then we might have to review this example again.

@mc1098 mc1098 added the A-examples Area: The examples label Sep 20, 2021
@mc1098
Copy link
Copy Markdown
Contributor Author

mc1098 commented Sep 21, 2021

Happy to merge? :)

@siku2 siku2 merged commit 7a3dd26 into yewstack:master Sep 21, 2021
@siku2
Copy link
Copy Markdown
Member

siku2 commented Sep 21, 2021

If you don't want to press the button, I certainly enjoy doing so :P

@mc1098 mc1098 deleted the fix-upload-example branch September 21, 2021 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-examples Area: The examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tasks are not removed from Vec in file upload example

3 participants