gdcc / easyDataverse

🪐 - Lightweight Dataverse interface in Python to upload, download and update datasets found in Dataverse installations.
MIT License
15 stars 4 forks source link

Allow different filename upon file upload #23

Closed JR-1991 closed 5 months ago

JR-1991 commented 5 months ago

This PR aligns to the recent python-dvuploader release, where it is possible to pass a different display name for a file.

Example

dataverse = Dataverse(BASE_URL, API_TOKEN)
dataset = dataverse.load_dataset(PID)

dataset.add_file(local_path="original.txt", filename="something_different.txt")

The file will be uploaded as something_different.txt instead of original.txt