Skip to content

Fixes file uploader showing invalid file modal just one time - #5537

Merged
AlexVelezLl merged 2 commits into
learningequality:unstablefrom
kart-u:corrected-buggy-modal-uploader
Nov 30, 2025
Merged

Fixes file uploader showing invalid file modal just one time#5537
AlexVelezLl merged 2 commits into
learningequality:unstablefrom
kart-u:corrected-buggy-modal-uploader

Conversation

@kart-u

Copy link
Copy Markdown
Contributor

Summary

Closes#5521
Due to the file input not being reset in Uploader.vue, the modal exhibited buggy behavior where a alert modal for particular invalid file would only appear once when doing consecutive upload for the same file.
This has been fixed by adding a resetFileInput() call on KModal submit

References

bandicam.2025-11-06.03-41-14-269.mp4

Reviewer guidance

@MisRob

Copy link
Copy Markdown
Member

Hi @kart-u, thanks for another contribution! We will assign a reviewer.

I've just merged your other #5522 - could you rebase this PR on top of the latest unstable so we can see the new diff only?

@MisRobMisRob changed the title corrected buggy modal from uploader.vueFixes file uploader showing invalid file modal just one timeNov 7, 2025
@kart-u
kart-uforce-pushed the corrected-buggy-modal-uploader branch from 438538c to 732c910CompareNovember 7, 2025 12:12
@kart-u

Copy link
Copy Markdown
ContributorAuthor

@MisRob I have rebased the branch onto the current unstable as you requested.

On a side note, I’m currently deepening my understanding of the codebase, so if there are any medium to hard issues in future, please consider me for them I’d love to contribute 😊

@MisRob

Copy link
Copy Markdown
Member

Thanks @kart-u, occasionally there is a gap like now, but typically few new 'help wanted' issues of various complexity are added each week, so you can keep an eye on the list.

@marcellamakimarcellamaki added this to the Studio: Q4 release milestone Nov 18, 2025
@AlexVelezLlAlexVelezLl self-assigned this Nov 18, 2025
@AlexVelezLl
AlexVelezLl self-requested a review November 18, 2025 16:21

@AlexVelezLlAlexVelezLl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @kart-u! This seems to be the right solution! However, it may be a bit tedious to maintain those different calls to the resetFileInput method, and if, for some reason, in the future, we have another modal, or if we add a @close event handler, we may forget to make this call to reset the input ref value.

What if we reset the fileUpload ref value after processing the files within the handleFiles method? That would make the solution a bit more flexible? Would like to know your thoughts!

@kart-u

Copy link
Copy Markdown
ContributorAuthor

@AlexVelezLl Sorry for the late reply I have exams going on, so my time was split. I also believe adding a reset in handleFiles is a better approach. I’ve updated the changes,please review.

@AlexVelezLlAlexVelezLl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @kart-u!! This looks excellent! Merging 👐

@AlexVelezLl
AlexVelezLl merged commit 78f03fc into learningequality:unstableNov 30, 2025
13 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File uploader shows invalid file modal just one time

4 participants

@kart-u@MisRob@AlexVelezLl@marcellamaki