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

fix: update the logic for maxFiles count in upload docs step #234

Conversation

shubhamv-ss
Copy link
Contributor

Description

In this PR, I've made following changes.

  1. Disable Upload Feature on Limit: When the maxFiles limit is reached, disable the upload feature to prevent users from uploading more files.
  2. Dynamic maxFiles Count: Make the maxFiles count dynamic based on the number of already uploaded documents.
  3. Display error message: You can only upload up to 3 files.

Why

maxFiles hardcoded value, causing following issues:

  1. Exceeding maxFiles limit: Users can upload multiple files even if maxFiles is set to 3.
  2. No error on exceeding limit: Attempting to upload a 4th file when maxFiles is 3 fails without displaying an error.
  3. Page refresh bypass: Refreshing the page resets the maxFiles limit, allowing users to upload more than 3 files.
  4. Delete all uploaded files: Users can delete all uploaded files, even if the total number exceeds the maxFiles limit.

Issue

#233

Checklist

  • I have performed a self-review of my own code
  • I have successfully tested my changes locally

@shubhamv-ss shubhamv-ss marked this pull request as draft July 29, 2024 06:52
@shubhamv-ss shubhamv-ss marked this pull request as ready for review July 29, 2024 08:27
oyo
oyo previously approved these changes Aug 1, 2024
Copy link
Contributor

@oyo oyo left a comment

Choose a reason for hiding this comment

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

lgtm

@evegufy evegufy self-assigned this Aug 6, 2024
Copy link
Contributor

@lavanya-bmw lavanya-bmw left a comment

Choose a reason for hiding this comment

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

please update changelog

@shubhamv-ss shubhamv-ss force-pushed the bug/upload-docs-maxFiles-count-not-updating-based-on-uploaded-files branch from ee191bd to 89cbf73 Compare August 8, 2024 09:54
@shubhamv-ss shubhamv-ss requested review from lavanya-bmw and oyo August 8, 2024 09:57
@shubhamv-ss
Copy link
Contributor Author

please update changelog

Hi @lavanya-bmw , I updated the changelog file.
Let me know if it's in correct format.

oyo
oyo previously approved these changes Aug 8, 2024
Copy link
Contributor

@oyo oyo left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@lavanya-bmw lavanya-bmw left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

@evegufy evegufy changed the title fix: updated the logic for maxFiles count in upload docs step fix: update the logic for maxFiles count in upload docs step Aug 13, 2024
@evegufy evegufy merged commit 1fdc0a1 into eclipse-tractusx:main Aug 13, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: USER READY
Development

Successfully merging this pull request may close these issues.

4 participants