Corrections
This commit is contained in:
parent
1689f73e89
commit
20622315bd
|
@ -2,8 +2,8 @@ from app import db
|
|||
from hashlib import sha256
|
||||
import os
|
||||
|
||||
class Attachement(db.Model):
|
||||
__tablename__ = 'attachement'
|
||||
class Attachment(db.Model):
|
||||
__tablename__ = 'attachment'
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
|
||||
# Original name of the file
|
||||
|
@ -22,7 +22,7 @@ class Attachement(db.Model):
|
|||
def __init__(self, file, comment):
|
||||
self.name = file.filename
|
||||
self.size = os.stat(file).st_size
|
||||
self.hashed = hash_file(file)
|
||||
self.hashed = self.hash_file(file)
|
||||
self.comment = comment
|
||||
|
||||
def hash_file(file):
|
Loading…
Reference in New Issue