[PM-20344] Disallow multiple attachments with the same name, handle existing in zip export format#21596
Conversation
…xisting in zip export format
🤖 Bitwarden Claude Code ReviewOverall Assessment: REQUEST CHANGES Reviewed the attachment duplicate-name handling for the Bitwarden zip export and the new client-side guard against uploading duplicate attachment names. The export now folders attachments by cipher name (with Code Review Details
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #21596 +/- ##
==========================================
+ Coverage 49.69% 49.70% +0.01%
==========================================
Files 4119 4119
Lines 129334 129361 +27
Branches 19816 19819 +3
==========================================
+ Hits 64271 64298 +27
+ Misses 60298 60297 -1
- Partials 4765 4766 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nick-livefront
left a comment
There was a problem hiding this comment.
Vault changes look good ✅
…isallowed characters
nick-livefront
left a comment
There was a problem hiding this comment.
@mcamirault FYI, some conflicts to fix!



🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-20344
📔 Objective
Currently when a cipher has multiple attachments with the same filename only one of them will be included when exporting in Bitwarden's zip format. This PR handles conflicting attachment filenames by having duplicates use a numeric suffix, and also makes the overall attachment folder easier to parse by using cipher names instead of IDs for the folders that contain the individual attachments (again handling duplicate names by using a numeric suffix).
For example, consider a vault that has two ciphers with the same name ("Test Cipher"), and each cipher has two attachments whose names are the same (one has two called "foo.txt" and the other has two called "bar.txt"). The exported attachments folder structure will look like this:
This PR also adjusts the Vault item attachments component to no longer allow duplicate attachment names and show an error toast if a duplicate upload is attempted.
📸 Screenshots
Screen.Recording.2026-06-30.at.13.11.37.mov