summaryrefslogtreecommitdiff
path: root/animism-align/cli/app/sql
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-07 11:10:07 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-07 11:10:07 +0200
commite3b5a6f93982310c36b36db7e677a115e34065e4 (patch)
tree41453480aaf8f77517be154350fb8a4bedf8823d /animism-align/cli/app/sql
parent60f8657b7a9b4130313367b85a5f60e53a89d31c (diff)
build
Diffstat (limited to 'animism-align/cli/app/sql')
-rw-r--r--animism-align/cli/app/sql/models/upload.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/animism-align/cli/app/sql/models/upload.py b/animism-align/cli/app/sql/models/upload.py
index 5863b07..8680f19 100644
--- a/animism-align/cli/app/sql/models/upload.py
+++ b/animism-align/cli/app/sql/models/upload.py
@@ -31,14 +31,15 @@ class Upload(Base):
'created_at': self.created_at,
}
- def filename(self):
- return "{}{}".format(self.fn)
+ # def filename(self):
+ # return "{}{}".format(self.fn)
- def filepath(self):
- return join(app_cfg.DIR_UPLOADS, sha256_tree(self.sha256))
+ # def filepath(self):
+ # return join(app_cfg.DIR_UPLOADS, sha256_tree(self.sha256))
- def fullpath(self):
- return join(self.filepath(), self.filename())
+ # def fullpath(self):
+ # return join(self.filepath(), self.filename())
def url(self):
- return join(app_cfg.URL_UPLOADS, sha256_tree(self.sha256), self.filename())
+ return join('/static/data_store/uploads', self.fn)
+ # return join(app_cfg.URL_UPLOADS, sha256_tree(self.sha256), self.filename())