ChainSafe / ChainSafe/ui-monorepo

Files upload with same name

Open
#2,270 0 comments 0 reactions 0 assignees View on GitHub
Issue: Bug 🐛
Dominant language
TypeScript
Stars
50
Forks
17
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
File upload with same name(in same directory) doesn't return conflict error

**To Reproduce**
Steps to reproduce the behavior:
1. Go to the app
2. Upload a file named xyz
3. Upload another file named xyz with different content
4. Doesn't return error and the file is not replaced either.

**Expected behavior**
Backend returns conflict error for the files.
Files upload is a batch operation and if there is conflict error for some files the upload returns all the entries for files and there status whether it got uploaded successfully or failed. UI needs to check the response.
The best way will be
1. Call check-upload API before uploading and inform user about the conflicting files to re- add files while uploading.
2. Check the response of the upload and inform about the failed files while uploading

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the duplicate-name upload in the app, then inspect the check-upload API and the upload response described in the issue. Confirm how conflicts are reported for batch entries and what status the UI receives; done means duplicate files return a conflict outcome and the UI informs the user about failed files.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
full-stack
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.