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

[ME]: Trying to upload the same file as a resource or attachment twice fails #1009

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

rcaplier
Copy link
Collaborator

Description

This PR fixes the overview and online resources file upload by checking if the filename already exists and renaming it if necessary.

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

**This work is sponsored by **.

@rcaplier rcaplier self-assigned this Sep 27, 2024
Copy link
Contributor

github-actions bot commented Sep 27, 2024

Affected libs: api-repository, feature-catalog, feature-record, feature-router, feature-editor, feature-search, feature-map, feature-dataviz, feature-auth, common-domain, api-metadata-converter, ui-search, common-fixtures, ui-elements, feature-notifications, ui-catalog, util-shared, ui-widgets, ui-inputs, ui-layout, ui-map, ui-dataviz,
Affected apps: metadata-editor, datahub, demo, webcomponents, map-viewer, search, datafeeder, metadata-converter, data-platform,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Copy link
Contributor

github-actions bot commented Sep 27, 2024

📷 Screenshots are here!

@coveralls
Copy link

coveralls commented Sep 27, 2024

Coverage Status

coverage: 83.089% (+2.1%) from 81.027%
when pulling 34a5484 on me-upload-same-file-twice
into fdf8f64 on main.

Copy link
Collaborator

@jahow jahow left a comment

Choose a reason for hiding this comment

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

Well done, thank you! I think the logic is perfect. In terms of implementation, I think we can achieve less repetition and better test coverage, see my remarks! Let me know if anything is unclear.

@jahow jahow force-pushed the me-upload-same-file-twice branch from 7c1883e to 461f4d6 Compare September 30, 2024 15:46
check if file name already exist and rename if that s the case before uploading
@jahow jahow force-pushed the me-upload-same-file-twice branch from 461f4d6 to 34a5484 Compare September 30, 2024 16:01
Copy link
Collaborator

@jahow jahow left a comment

Choose a reason for hiding this comment

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

thanks!

@jahow jahow merged commit 3b6b95e into main Sep 30, 2024
11 checks passed
@jahow jahow deleted the me-upload-same-file-twice branch September 30, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants