forceReplace parameter not working in API endpoint for zip files
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
I am currently working with Dataverse v6.0 using API endpoint https://dataverse.harvard.edu/api/datasets/:persistentId/add?persistentId=doi:10.7910/DVN/SKP9IB with parameters of {'description': 'Right SUPRAPAT LONG, ultrasound image files', 'directoryLabel': 'data/image/ultrasound', 'fileName': '11.zip', 'forceReplace': 'true', 'categories': ['data', 'images', 'ultrasound']}. I checked that the MD5 hash is different between the current 11.zip file in the dataset and the new file being uploaded and they are different, so the file replacement should work as it was doing several months ago. Currently I get a duplicate file created instead with a name such as 11-1.zip. Has something changed on this API endpoint to not allow the file replacement?
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 by reproducing the upload through the Dataverse v6.0 /api/datasets/:persistentId/add endpoint with forceReplace=true, using a changed 11.zip and the reported directory and persistent ID. Compare the duplicate-file behavior with the expected replacement behavior and identify the relevant API handling; done means changed zip uploads replace the existing file rather than creating 11-1.zip.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100