IQSS / IQSS/dataverse-frontend
[Tech Debt] Removing files from UploadedFilesList leaves orphaned objects in S3 storage
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31
- Forks
- 26
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 4
Description
Issue Body:
What steps does it take to reproduce the issue?
Navigate to the Dataset File Upload page.
Select and upload one or more files (files are sent directly to the S3 bucket during upload).
In the uploaded files list, click the remove button (X) next to a file or select multiple files and choose "Remove selected files".
The files are removed from the frontend UI form state, but no delete call is triggered to remove the uploaded temporary objects from the S3 storage bucket.
When does this issue occur?
When a user uploads files and decides to remove one or more files from the list before saving the dataset.
Which page(s) does it occur on?
Dataset File Upload Page (src/sections/shared/file-uploader/uploaded-files-list/UploadedFilesList.tsx).
What happens?
The uploaded file objects remain permanently stored in S3 as orphaned objects, consuming unnecessary storage space. There are existing code comments flagging this missing behavior:
TypeScript
// TODO - Remove the file from the S3 bucket we need an API endpoint for this.
To whom does it occur (all users, curators, superusers)?
All users uploading files.
What did you expect to happen?
Removing an uploaded file from the staging table should either purge/delete the object from the backend storage bucket or communicate with an endpoint dedicated to cleaning up discarded temp uploads.
Which version of Dataverse Frontend are you using?
develop branch (v0.3.1)
Any related open or closed issues to this bug report?
None currently open for S3 temp cleanup on direct file removal.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/sections/shared/file-uploader/uploaded-files-list/UploadedFilesList.tsx and trace the single-file and selected-file removal handlers, including the TODO about deleting from S3. Then inspect the existing upload API flow to determine whether a cleanup endpoint is available or needs coordination. Done means discarded temporary objects are removed from S3 when files leave the list, with the removal behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- backend-api-design, cloud, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100