Stream: community

Topic: โœ” zip file replacement within dataset


view this post on Zulip kuhlaid (Mar 13 2024 at 20:35):

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

view this post on Zulip Philip Durbin ๐Ÿš€ (Mar 13 2024 at 20:53):

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?

view this post on Zulip kuhlaid (Mar 13 2024 at 21:04):

Is there an API method for deleting files?

view this post on Zulip Philip Durbin ๐Ÿš€ (Mar 13 2024 at 21:11):

Yep: https://guides.dataverse.org/en/6.1/api/native-api.html#deleting-files

view this post on Zulip kuhlaid (Mar 13 2024 at 21:36):

Woohoo! Thank you Philip!

view this post on Zulip Notification Bot (Mar 13 2024 at 21:36):

kuhlaid has marked this topic as resolved.


Last updated: Nov 01 2025 at 14:11 UTC