def showThumb(image): if not 'username' in session and imagedb.isHidden(image): abort(403) return Response(imagedb.getImage(image, type='thumb'), mimetype=config.thumbMime)
def showImage(image): if not 'username' in session and imagedb.isHidden(image): abort(403) i = imagedb.getImage(image, type='image') return Response(i[0].read(), mimetype=i[1])