diff --git a/kgadget/src/id2file.py b/kgadget/src/id2file.py deleted file mode 100644 index bb044a1..0000000 --- a/kgadget/src/id2file.py +++ /dev/null @@ -1,12 +0,0 @@ - -from sqlor.dbpools import runSQL - -async def getFilenameFromId(idstr:str) -> str: - sql = "select * from kvobjects where id='%s'" % idstr - recs = await runSQL('homedata',sql) - if recs is None: - return None - if len(recs) == 0: - return None - return recs[0].name - diff --git a/kgadget/src/imgThumb.py b/kgadget/src/imgThumb.py index 51773ba..f46cf9a 100644 --- a/kgadget/src/imgThumb.py +++ b/kgadget/src/imgThumb.py @@ -9,7 +9,7 @@ from aiohttp.web_exceptions import ( HTTPNotFound, ) from aiohttp.web_response import Response, StreamResponse -from id2file import getFilenameFromId +# from id2file import getFilenameFromId def imageUp(img): diff --git a/kgadget/src/kgadget.py b/kgadget/src/kgadget.py index 00f6baa..eb6de3a 100644 --- a/kgadget/src/kgadget.py +++ b/kgadget/src/kgadget.py @@ -44,7 +44,6 @@ from appPublic.rc4 import unpassword, password from ahserver.filedownload import path_encode from imgThumb import thumb -from idfile import idFileDownload from myauth import MyAuthAPI from rf import getPublicKey, getI18nMapping from version import __version__ @@ -133,7 +132,6 @@ if __name__ == '__main__': server = ConfiguredServer(auth_klass=MyAuthAPI, workdir=workdir) rf = RegisterFunction() rf.register('makeThumb',thumb) - rf.register('idFileDownload',idFileDownload) rf.register('getPublicKey', getPublicKey) rf.register('getI18nMapping', getI18nMapping) g = ServerEnv()