GNServer 0.0.0.0.2__tar.gz → 0.0.0.0.3__tar.gz

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.
@@ -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', {'file': {'mime-type': mime_type, 'data': data}})
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
- payload[ext_file] = await file.read()
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GNServer
3
- Version: 0.0.0.0.2
3
+ Version: 0.0.0.0.3
4
4
  Summary: GNServer
5
5
  Home-page: https://github.com/KeyisB/libs/tree/main/GNServer
6
6
  Author: KeyisB
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GNServer
3
- Version: 0.0.0.0.2
3
+ Version: 0.0.0.0.3
4
4
  Summary: GNServer
5
5
  Home-page: https://github.com/KeyisB/libs/tree/main/GNServer
6
6
  Author: KeyisB
@@ -5,7 +5,7 @@ filesName = 'GNServer'
5
5
 
6
6
  setup(
7
7
  name=name,
8
- version='0.0.0.0.2',
8
+ version='0.0.0.0.3',
9
9
  author="KeyisB",
10
10
  author_email="keyisb.pip@gmail.com",
11
11
  description=name,
File without changes
File without changes
File without changes