Skip to content
Snippets Groups Projects

eossr upload unique function

Merged Vuillaume requested to merge eossr_upload into master
3 files
+ 22
30
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -138,6 +138,19 @@ class ZenodoAPI:
return upload
def upload_dir_content(self, directory, record_id):
for full_path_file in Path(directory).iterdir():
new_upload = self.upload_file_entry(
record_id,
name_file=full_path_file.name,
path_file=full_path_file
)
http_status.ZenodoHTTPStatus(new_upload.status_code, new_upload.json())
print(f"* File {full_path_file.name} correctly uploaded")
# TODO: add logging for each file
def update_metadata_entry(self, entry_id, json_metadata):
"""
Update an entry resource. Data should be the entry information that will be shown when a deposition is visited
Loading