image_view.py 350 B

1234567891011
  1. from .tool.func import *
  2. APPVAR = json.loads(open('data/app_variables.json', encoding='utf-8').read())
  3. def image_view_2(conn, name):
  4. curs = conn.cursor()
  5. if os.path.exists(os.path.join(APPVAR['PATH_DATA_IMAGES'], name)):
  6. return flask.send_from_directory('.'+APPVAR['PATH_DATA_IMAGES'], name)
  7. else:
  8. return redirect()