GNServer 0.0.0.0.2__py3-none-any.whl → 0.0.0.0.3__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.
- GNServer/_app.py +5 -13
- {gnserver-0.0.0.0.2.dist-info → gnserver-0.0.0.0.3.dist-info}/METADATA +1 -1
- gnserver-0.0.0.0.3.dist-info/RECORD +7 -0
- gnserver-0.0.0.0.2.dist-info/RECORD +0 -7
- {gnserver-0.0.0.0.2.dist-info → gnserver-0.0.0.0.3.dist-info}/WHEEL +0 -0
- {gnserver-0.0.0.0.2.dist-info → gnserver-0.0.0.0.3.dist-info}/licenses/LICENSE +0 -0
- {gnserver-0.0.0.0.2.dist-info → gnserver-0.0.0.0.3.dist-info}/top_level.txt +0 -0
GNServer/_app.py
CHANGED
@@ -288,7 +288,7 @@ class App:
|
|
288
288
|
async with aiofiles.open(file_path, "rb") as f:
|
289
289
|
data = f.read()
|
290
290
|
|
291
|
-
return gn.GNResponse('ok', {'
|
291
|
+
return gn.GNResponse('ok', {'files': [{'mime-type': mime_type, 'data': data}]})
|
292
292
|
|
293
293
|
|
294
294
|
|
@@ -443,21 +443,13 @@ class App:
|
|
443
443
|
if ext_file_.startswith('/') or ext_file_.startswith('./'):
|
444
444
|
try:
|
445
445
|
async with await anyio.open_file(ext_file_, mode="rb") as file:
|
446
|
-
|
446
|
+
data = await file.read()
|
447
|
+
|
448
|
+
payload.pop(ext_file)
|
449
|
+
payload['files'] = [{'mime-type': guess_type(ext_file), 'data': data}]
|
447
450
|
except Exception as e:
|
448
451
|
payload[ext_file] = f'GNServer error: {e}'
|
449
452
|
logger.debug(f'error resolving extra response -> {traceback.format_exc()}')
|
450
|
-
|
451
|
-
# if 'static' in payload:
|
452
|
-
# ext_file_ = payload.get('static')
|
453
|
-
# if ext_file_ is not None:
|
454
|
-
# if isinstance(ext_file_, str):
|
455
|
-
# if ext_file_.startswith('/') or ext_file_.startswith('./'):
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
453
|
return response
|
462
454
|
|
463
455
|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
GNServer/__init__.py,sha256=T6kT6WoJpmIXashMSHfuafb9DSePUIzw192h27j9a4M,1364
|
2
|
+
GNServer/_app.py,sha256=dCV8vs3eWna4QbF2WpNYsDROZTIf1LJIZrYXUyxEomg,17116
|
3
|
+
gnserver-0.0.0.0.3.dist-info/licenses/LICENSE,sha256=WH_t7dKZyWJ5Ld07eYIkUG4Tv6zZWXtAdsUqYAUesn0,1084
|
4
|
+
gnserver-0.0.0.0.3.dist-info/METADATA,sha256=F2nrEBBzvO2H173MvRZVZ-zC4J_e1LFyzqdAM5d6LGc,804
|
5
|
+
gnserver-0.0.0.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
6
|
+
gnserver-0.0.0.0.3.dist-info/top_level.txt,sha256=-UOUBuD4u7Qkb1o5PdcwyA3kx8xCH2lwy0tJHi26Wb4,9
|
7
|
+
gnserver-0.0.0.0.3.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
GNServer/__init__.py,sha256=T6kT6WoJpmIXashMSHfuafb9DSePUIzw192h27j9a4M,1364
|
2
|
-
GNServer/_app.py,sha256=MdacElafrire2n1NODsa2eo5uHd21xB8kBSZXlGzGts,17327
|
3
|
-
gnserver-0.0.0.0.2.dist-info/licenses/LICENSE,sha256=WH_t7dKZyWJ5Ld07eYIkUG4Tv6zZWXtAdsUqYAUesn0,1084
|
4
|
-
gnserver-0.0.0.0.2.dist-info/METADATA,sha256=1bLqqwScQDZgP61trZEhdOTRIQLHzqYpgjOWTt3MDyI,804
|
5
|
-
gnserver-0.0.0.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
6
|
-
gnserver-0.0.0.0.2.dist-info/top_level.txt,sha256=-UOUBuD4u7Qkb1o5PdcwyA3kx8xCH2lwy0tJHi26Wb4,9
|
7
|
-
gnserver-0.0.0.0.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|