Encrypted zip upload works through browser uploads but not through API uploads.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
What steps does it take to reproduce the issue?
zip --encrypt test_dir.zip test_dir
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export FILENAME=test_dir.zip
export SERVER_URL=https://dataverse.example.org
export PERSISTENT_ID=doi:10.5072/FK2/xxxxxx
curl -H X-Dataverse-key:$API_TOKEN -X POST -F "file=@$FILENAME" -F 'jsonData={"description":"My description.","directoryLabel":"data/subdir1","categories":["Data"], "restrict":"true", "tabIngest":"false"}' "$SERVER_URL/api/datasets/:persistentId/add?persistentId=$PERSISTENT_ID"
-
When does this issue occur?
When uploading through the add data API -
Which page(s) does it occurs on?
Dataset upload -
What happens?
An error is returned by the API saying "Failed to unzip the file. Saving the file as is."
However, you don't see the zip file in the dataset on the webpage. -
What did you expect to happen?
Similar to browser uploads, api upload should work for encrypted zips too.
Which version of Dataverse are you using?
5.11.1
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 encrypted zip upload with the provided curl command against a Dataverse 5.11.1 instance, then compare it with the browser upload path. Trace the add data API handling of encrypted archives; done means the API upload succeeds and the zip is visible in the dataset like a browser upload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100