unfinished work
This commit is contained in:
@@ -80,7 +80,7 @@ class APIHandler:
|
||||
entry_data = response.json()
|
||||
return entry_data
|
||||
|
||||
def download_attachments_data(self, elabid, entryType="experiments"):
|
||||
def download_all_attachments_data(self, elabid, entryType="experiments"):
|
||||
"""
|
||||
Downloads attachments of a certain eLabFTW experiment (default) or item.
|
||||
Only returns their binary data. Use method download_attachments_to_disk to save to file.
|
||||
@@ -142,7 +142,7 @@ class APIHandler:
|
||||
"You can only download attachments from experiments or items."
|
||||
)
|
||||
|
||||
uploads = download_attachments_data(elabid, entryType=entryType)
|
||||
uploads = download_all_attachments_data(elabid, entryType=entryType)
|
||||
for file in uploads:
|
||||
raw_data = uploads["file"]
|
||||
with open(os.path.join(dump_dir, f"exp{elabid}-{file}"), "wb") as f:
|
||||
|
||||
Reference in New Issue
Block a user