nucliadb 6.2.1.post2861__py3-none-any.whl → 6.2.1.post2864__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/writer/api/v1/upload.py +1 -1
- nucliadb/writer/tus/gcs.py +11 -10
- {nucliadb-6.2.1.post2861.dist-info → nucliadb-6.2.1.post2864.dist-info}/METADATA +5 -5
- {nucliadb-6.2.1.post2861.dist-info → nucliadb-6.2.1.post2864.dist-info}/RECORD +8 -8
- {nucliadb-6.2.1.post2861.dist-info → nucliadb-6.2.1.post2864.dist-info}/WHEEL +0 -0
- {nucliadb-6.2.1.post2861.dist-info → nucliadb-6.2.1.post2864.dist-info}/entry_points.txt +0 -0
- {nucliadb-6.2.1.post2861.dist-info → nucliadb-6.2.1.post2864.dist-info}/top_level.txt +0 -0
- {nucliadb-6.2.1.post2861.dist-info → nucliadb-6.2.1.post2864.dist-info}/zip-safe +0 -0
nucliadb/writer/api/v1/upload.py
CHANGED
@@ -227,7 +227,7 @@ async def _tus_post(
|
|
227
227
|
size = int(request.headers["upload-length"])
|
228
228
|
else:
|
229
229
|
if not deferred_length:
|
230
|
-
raise HTTPPreconditionFailed(detail="
|
230
|
+
raise HTTPPreconditionFailed(detail="upload-length header is required")
|
231
231
|
|
232
232
|
if "tus-resumable" not in request.headers:
|
233
233
|
raise HTTPPreconditionFailed(detail="TUS needs a TUS version")
|
nucliadb/writer/tus/gcs.py
CHANGED
@@ -354,23 +354,24 @@ class GCloudFileStorageManager(FileStorageManager):
|
|
354
354
|
if dm.size == 0:
|
355
355
|
if self.storage.session is None:
|
356
356
|
raise AttributeError()
|
357
|
-
#
|
358
|
-
|
359
|
-
|
360
|
-
|
357
|
+
# In case of empty file, we need to send a PUT request with empty body
|
358
|
+
# and Content-Range header set to "bytes */0"
|
359
|
+
headers = {
|
360
|
+
"Content-Length": "0",
|
361
|
+
"Content-Range": "bytes */0",
|
362
|
+
}
|
361
363
|
resumable_uri = dm.get("resumable_uri")
|
362
364
|
async with self.storage.session.put(
|
363
365
|
resumable_uri,
|
364
|
-
headers=
|
365
|
-
"Content-Length": "0",
|
366
|
-
"Content-Range": content_range,
|
367
|
-
},
|
366
|
+
headers=headers,
|
368
367
|
data="",
|
369
368
|
) as call:
|
370
|
-
text = await call.text() # noqa
|
371
369
|
if call.status not in [200, 201, 308]:
|
370
|
+
try:
|
371
|
+
text = await call.text()
|
372
|
+
except Exception:
|
373
|
+
text = ""
|
372
374
|
raise GoogleCloudException(f"{call.status}: {text}")
|
373
|
-
return call
|
374
375
|
path = dm.get("path")
|
375
376
|
await dm.finish()
|
376
377
|
return path
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: nucliadb
|
3
|
-
Version: 6.2.1.
|
3
|
+
Version: 6.2.1.post2864
|
4
4
|
Home-page: https://docs.nuclia.dev/docs/management/nucliadb/intro
|
5
5
|
Author: NucliaDB Community
|
6
6
|
Author-email: nucliadb@nuclia.com
|
@@ -22,10 +22,10 @@ Classifier: Programming Language :: Python :: 3.12
|
|
22
22
|
Classifier: Programming Language :: Python :: 3 :: Only
|
23
23
|
Requires-Python: >=3.9, <4
|
24
24
|
Description-Content-Type: text/markdown
|
25
|
-
Requires-Dist: nucliadb-telemetry[all]>=6.2.1.
|
26
|
-
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.2.1.
|
27
|
-
Requires-Dist: nucliadb-protos>=6.2.1.
|
28
|
-
Requires-Dist: nucliadb-models>=6.2.1.
|
25
|
+
Requires-Dist: nucliadb-telemetry[all]>=6.2.1.post2864
|
26
|
+
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.2.1.post2864
|
27
|
+
Requires-Dist: nucliadb-protos>=6.2.1.post2864
|
28
|
+
Requires-Dist: nucliadb-models>=6.2.1.post2864
|
29
29
|
Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
|
30
30
|
Requires-Dist: nucliadb-node-binding>=2.26.0
|
31
31
|
Requires-Dist: nuclia-models>=0.24.2
|
@@ -323,7 +323,7 @@ nucliadb/writer/api/v1/router.py,sha256=RjuoWLpZer6Kl2BW_wznpNo6XL3BOpdTGqXZCn3Q
|
|
323
323
|
nucliadb/writer/api/v1/services.py,sha256=U8OGxhA1tdt-wxw2uDAjFpwFXFEXSDTfBe1iV5nfmx8,9897
|
324
324
|
nucliadb/writer/api/v1/slug.py,sha256=xlVBDBpRi9bNulpBHZwhyftVvulfE0zFm1XZIWl-AKY,2389
|
325
325
|
nucliadb/writer/api/v1/transaction.py,sha256=d2Vbgnkk_-FLGSTt3vfldwiJIUf0XoyD0wP1jQNz_DY,2430
|
326
|
-
nucliadb/writer/api/v1/upload.py,sha256=
|
326
|
+
nucliadb/writer/api/v1/upload.py,sha256=wSSQ8cBgjkxuo9EU-buxXVunI6HIBWhTBLlDmyZJ3Ck,32909
|
327
327
|
nucliadb/writer/resource/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
328
328
|
nucliadb/writer/resource/audit.py,sha256=FvxMZPzrNHtd31HgpZEvxzwAkbxJTZRhPLqRYYJi3tA,1426
|
329
329
|
nucliadb/writer/resource/basic.py,sha256=l9zD-Qiq4eUkHezMf0w1Ksx2izKYLYuNoMIlXcNxxpM,11163
|
@@ -333,14 +333,14 @@ nucliadb/writer/tus/__init__.py,sha256=huWpKnDnjsrKlBBJk30ta5vamlA-4x0TbPs_2Up8h
|
|
333
333
|
nucliadb/writer/tus/azure.py,sha256=XhWAlWTM0vmXcXtuEPYjjeEhuZjiZXZu8q9WsJ7omFE,4107
|
334
334
|
nucliadb/writer/tus/dm.py,sha256=bVoXqt_dpNvTjpffPYhj1JfqK6gfLoPr0hdkknUCZ9E,5488
|
335
335
|
nucliadb/writer/tus/exceptions.py,sha256=WfZSSjsHfoy63wUFlH3QoHx7FMoCNA1oKJmWpZZDnCo,2156
|
336
|
-
nucliadb/writer/tus/gcs.py,sha256=
|
336
|
+
nucliadb/writer/tus/gcs.py,sha256=bprTnvAjDaTgiGOdy9HqFZi8joZBiYx7auevF4rwIXs,14083
|
337
337
|
nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,5193
|
338
338
|
nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
|
339
339
|
nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
|
340
340
|
nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
|
341
|
-
nucliadb-6.2.1.
|
342
|
-
nucliadb-6.2.1.
|
343
|
-
nucliadb-6.2.1.
|
344
|
-
nucliadb-6.2.1.
|
345
|
-
nucliadb-6.2.1.
|
346
|
-
nucliadb-6.2.1.
|
341
|
+
nucliadb-6.2.1.post2864.dist-info/METADATA,sha256=-W5qHhu9x0clURMbD6zCYn6SsU9etVobB7qbn9jrebo,4689
|
342
|
+
nucliadb-6.2.1.post2864.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
343
|
+
nucliadb-6.2.1.post2864.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
|
344
|
+
nucliadb-6.2.1.post2864.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
|
345
|
+
nucliadb-6.2.1.post2864.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
346
|
+
nucliadb-6.2.1.post2864.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|