Images to scanimation folder
This commit is contained in:
parent
363219ae7d
commit
7df1cd7727
2 changed files with 7 additions and 4 deletions
|
@ -59,10 +59,13 @@ class HIT(Base):
|
|||
|
||||
|
||||
def getImagePath(self):
|
||||
return os.path.join('www', self.getImageUrl())
|
||||
return os.path.join('../scanimation/interfaces/frames', f"{self.id}.jpg")
|
||||
|
||||
def getImageUrl(self):
|
||||
return f"scans/{self.id}.jpg"
|
||||
# def getImageUrl(self):
|
||||
# return f"{self.id}.jpg"
|
||||
|
||||
def getSvgImageUrl(self):
|
||||
return f"scans/{self.id}.svg"
|
||||
|
||||
def getStatus(self):
|
||||
if self.scanned_at:
|
||||
|
|
|
@ -268,7 +268,7 @@ class DrawPageHandler(tornado.web.RequestHandler):
|
|||
logger.warning("No previous HIT, start from basic svg")
|
||||
image = "/basic.svg"
|
||||
else:
|
||||
image = previous_hit.getImageUrl()
|
||||
image = previous_hit.getSvgImageUrl()
|
||||
logger.info(f"Image url: {image}")
|
||||
|
||||
self.set_header("Access-Control-Allow-Origin", "*")
|
||||
|
|
Loading…
Reference in a new issue