pyzotero 1.7.5__py3-none-any.whl → 1.7.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyzotero/zotero.py +6 -0
- {pyzotero-1.7.5.dist-info → pyzotero-1.7.6.dist-info}/METADATA +1 -1
- {pyzotero-1.7.5.dist-info → pyzotero-1.7.6.dist-info}/RECORD +5 -5
- {pyzotero-1.7.5.dist-info → pyzotero-1.7.6.dist-info}/WHEEL +0 -0
- {pyzotero-1.7.5.dist-info → pyzotero-1.7.6.dist-info}/entry_points.txt +0 -0
pyzotero/zotero.py
CHANGED
|
@@ -1879,6 +1879,12 @@ class Zupload:
|
|
|
1879
1879
|
msg,
|
|
1880
1880
|
)
|
|
1881
1881
|
return None # Don't do anything if payload comes with keys
|
|
1882
|
+
# Set contentType for each attachment if not already provided
|
|
1883
|
+
for item in self.payload:
|
|
1884
|
+
if not item.get("contentType"):
|
|
1885
|
+
filepath = str(self.basedir.joinpath(item["filename"]))
|
|
1886
|
+
detected_type = mimetypes.guess_type(filepath)[0]
|
|
1887
|
+
item["contentType"] = detected_type or "application/octet-stream"
|
|
1882
1888
|
liblevel = "/{t}/{u}/items"
|
|
1883
1889
|
# Create one or more new attachments
|
|
1884
1890
|
headers = {"Zotero-Write-Token": token(), "Content-Type": "application/json"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
pyzotero/__init__.py,sha256=5QI4Jou9L-YJAf_oN9TgRXVKgt_Unc39oADo2Ch8bLI,243
|
|
2
2
|
pyzotero/cli.py,sha256=dsq4QFqs4vig7CpORQYWD96smM8Z00BbaVh8AsLjhmg,16243
|
|
3
3
|
pyzotero/filetransport.py,sha256=umLik1LLmrpgaNmyjvtBoqqcaMgIq79PYsTvN5vG-gY,5530
|
|
4
|
-
pyzotero/zotero.py,sha256=
|
|
4
|
+
pyzotero/zotero.py,sha256=nUgch-YvNHiQb8qR7Pz9ntgNJv76XDcvINvCs56vvFc,76877
|
|
5
5
|
pyzotero/zotero_errors.py,sha256=6obx9-pBO0z1bxt33vuzDluELvA5kSLCsfc-uGc3KNw,2660
|
|
6
|
-
pyzotero-1.7.
|
|
7
|
-
pyzotero-1.7.
|
|
8
|
-
pyzotero-1.7.
|
|
9
|
-
pyzotero-1.7.
|
|
6
|
+
pyzotero-1.7.6.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
7
|
+
pyzotero-1.7.6.dist-info/entry_points.txt,sha256=MzN7IMRj_oPNmDCsseYFPum3bHWE1gFxywhlbFbcn2k,48
|
|
8
|
+
pyzotero-1.7.6.dist-info/METADATA,sha256=oPlV0BYolZ8TXTWJjtnChKeA4Rxcf1rx2crVENVlRhY,9962
|
|
9
|
+
pyzotero-1.7.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|