nucliadb-utils 6.0.0.post2278__py3-none-any.whl → 6.0.0.post2297__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.
- nucliadb_utils/storages/storage.py +6 -3
- {nucliadb_utils-6.0.0.post2278.dist-info → nucliadb_utils-6.0.0.post2297.dist-info}/METADATA +3 -3
- {nucliadb_utils-6.0.0.post2278.dist-info → nucliadb_utils-6.0.0.post2297.dist-info}/RECORD +6 -6
- {nucliadb_utils-6.0.0.post2278.dist-info → nucliadb_utils-6.0.0.post2297.dist-info}/WHEEL +0 -0
- {nucliadb_utils-6.0.0.post2278.dist-info → nucliadb_utils-6.0.0.post2297.dist-info}/top_level.txt +0 -0
- {nucliadb_utils-6.0.0.post2278.dist-info → nucliadb_utils-6.0.0.post2297.dist-info}/zip-safe +0 -0
@@ -21,6 +21,7 @@ from __future__ import annotations
|
|
21
21
|
|
22
22
|
import abc
|
23
23
|
import asyncio
|
24
|
+
import base64
|
24
25
|
import hashlib
|
25
26
|
import uuid
|
26
27
|
from io import BytesIO
|
@@ -352,18 +353,20 @@ class Storage(abc.ABC, metaclass=abc.ABCMeta):
|
|
352
353
|
content_type: str,
|
353
354
|
md5: Optional[str] = None,
|
354
355
|
):
|
356
|
+
decoded_payload = base64.b64decode(payload)
|
355
357
|
cf = CloudFile()
|
356
358
|
cf.filename = filename
|
357
359
|
cf.content_type = content_type
|
358
|
-
cf.size = len(
|
360
|
+
cf.size = len(decoded_payload)
|
359
361
|
cf.source = self.source # type: ignore
|
360
362
|
|
361
363
|
if md5 is None:
|
362
|
-
md5hash = hashlib.md5(
|
364
|
+
md5hash = hashlib.md5(decoded_payload).digest()
|
363
365
|
cf.md5 = md5hash.decode()
|
364
366
|
else:
|
365
367
|
cf.md5 = md5
|
366
|
-
|
368
|
+
|
369
|
+
buffer = BytesIO(decoded_payload)
|
367
370
|
|
368
371
|
async def splitter(alldata: BytesIO):
|
369
372
|
while True:
|
{nucliadb_utils-6.0.0.post2278.dist-info → nucliadb_utils-6.0.0.post2297.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nucliadb_utils
|
3
|
-
Version: 6.0.0.
|
3
|
+
Version: 6.0.0.post2297
|
4
4
|
Home-page: https://nuclia.com
|
5
5
|
License: BSD
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
@@ -24,8 +24,8 @@ Requires-Dist: PyNaCl
|
|
24
24
|
Requires-Dist: pyjwt>=2.4.0
|
25
25
|
Requires-Dist: memorylru>=1.1.2
|
26
26
|
Requires-Dist: mrflagly>=0.2.9
|
27
|
-
Requires-Dist: nucliadb-protos>=6.0.0.
|
28
|
-
Requires-Dist: nucliadb-telemetry>=6.0.0.
|
27
|
+
Requires-Dist: nucliadb-protos>=6.0.0.post2297
|
28
|
+
Requires-Dist: nucliadb-telemetry>=6.0.0.post2297
|
29
29
|
Provides-Extra: cache
|
30
30
|
Requires-Dist: redis>=4.3.4; extra == "cache"
|
31
31
|
Requires-Dist: orjson>=3.6.7; extra == "cache"
|
@@ -48,7 +48,7 @@ nucliadb_utils/storages/nuclia.py,sha256=vEv94xAT7QM2g80S25QyrOw2pzvP2BAX-ADgZLt
|
|
48
48
|
nucliadb_utils/storages/object_store.py,sha256=Tw10GmpYfM5TMqJ3Tk9pLQ9wLMBk1-snL_m6uasiZDQ,4257
|
49
49
|
nucliadb_utils/storages/s3.py,sha256=tCJxSXwSq2hKaFole71ctpEXjcjBElUuTFWlmhLkytM,19471
|
50
50
|
nucliadb_utils/storages/settings.py,sha256=ugCPy1zxBOmA2KosT-4tsjpvP002kg5iQyi42yCGCJA,1285
|
51
|
-
nucliadb_utils/storages/storage.py,sha256=
|
51
|
+
nucliadb_utils/storages/storage.py,sha256=onwQJ4at-XewEG7dxcWdOqobfCw4w0PyPC7olvFJgjI,20295
|
52
52
|
nucliadb_utils/storages/utils.py,sha256=8g2rIwJeYIumQLOB47Yw1rx3twlhRB_cJxer65QfZmk,1479
|
53
53
|
nucliadb_utils/tests/__init__.py,sha256=Oo9CAE7B0eW5VHn8sHd6o30SQzOWUhktLPRXdlDOleA,1456
|
54
54
|
nucliadb_utils/tests/asyncbenchmark.py,sha256=x4be2IwCawle9zWgMOJkmwoUwk5p1tv7cLQGmybkEOg,10587
|
@@ -59,8 +59,8 @@ nucliadb_utils/tests/indexing.py,sha256=YW2QhkhO9Q_8A4kKWJaWSvXvyQ_AiAwY1VylcfVQ
|
|
59
59
|
nucliadb_utils/tests/local.py,sha256=fXIBasrvdaFJM-sw2wk1_oiFzBcm9O10iCyC-OiXwY8,1914
|
60
60
|
nucliadb_utils/tests/nats.py,sha256=xqpww4jZjTKY9oPGlJdDJG67L3FIBQsa9qDHxILR8r8,7687
|
61
61
|
nucliadb_utils/tests/s3.py,sha256=pl-RJFjA4MH6iXkqhsh5g8gDuEhrYu1nPZ-laxlrMlE,3704
|
62
|
-
nucliadb_utils-6.0.0.
|
63
|
-
nucliadb_utils-6.0.0.
|
64
|
-
nucliadb_utils-6.0.0.
|
65
|
-
nucliadb_utils-6.0.0.
|
66
|
-
nucliadb_utils-6.0.0.
|
62
|
+
nucliadb_utils-6.0.0.post2297.dist-info/METADATA,sha256=fy2eme0QekfqoCl2xO8_BlZUebV2sfalyXEOZhGFXDI,2055
|
63
|
+
nucliadb_utils-6.0.0.post2297.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
64
|
+
nucliadb_utils-6.0.0.post2297.dist-info/top_level.txt,sha256=fE3vJtALTfgh7bcAWcNhcfXkNPp_eVVpbKK-2IYua3E,15
|
65
|
+
nucliadb_utils-6.0.0.post2297.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
66
|
+
nucliadb_utils-6.0.0.post2297.dist-info/RECORD,,
|
File without changes
|
{nucliadb_utils-6.0.0.post2278.dist-info → nucliadb_utils-6.0.0.post2297.dist-info}/top_level.txt
RENAMED
File without changes
|
{nucliadb_utils-6.0.0.post2278.dist-info → nucliadb_utils-6.0.0.post2297.dist-info}/zip-safe
RENAMED
File without changes
|