I'm sorry, I'm only here today to beg. Currently 'double zipped' zip files cannot be replaced when using the 'forceReplace="true"' parameter within the 'api/datasets/:persistentId/add?persistentId=' API. A duplicate zip file gets created instead of replacing the existing file. Why is this is big deal? Well, I have folders of images that need to go into a dataset. Archiving the image folders into a zip file makes for rather quick dataset updates. The alternative to zip archives is a seriously slow method of individually uploading the images to the dataset and a higher load on the server trying to upload these individual file. These images have relatively small file sizes, but since each image is now treated as an individual file there is a huge difference between uploading twenty zip archives and 10,000+ individual images. I am having to switch my dataset to storing individual image files because I am unable to update my dataset with newer versions of the zip archives. Anyway, I just wanted to put this on your radar because it would probably be helpful from a server load standpoint as well as storage optimization to support the replacement of double-zipped archives instead of users having to resort to handling large numbers of files with their own individual API calls instead of packaging (say 600 files) within one zip archive. - Thank you
Ha, begging is fine. :crazy:
In the beginning Dataverse didn't support replacing files. Instead people would delete the original file and then upload a new file. You can still do this. Would that work for you?
Is there an API method for deleting files?
Yep: https://guides.dataverse.org/en/6.1/api/native-api.html#deleting-files
Woohoo! Thank you Philip!
kuhlaid has marked this topic as resolved.
Last updated: Nov 01 2025 at 14:11 UTC