feat: add SHA256 hash attribute to knowledge object on save
This commit is contained in:
parent
ab479c422c
commit
9f004defd9
@ -281,6 +281,7 @@ class File(AppModelMixin):
|
|||||||
result = select_one("SELECT lo_from_bytea(%s, %s::bytea) as loid", [0, bytea])
|
result = select_one("SELECT lo_from_bytea(%s, %s::bytea) as loid", [0, bytea])
|
||||||
self.loid = result['loid']
|
self.loid = result['loid']
|
||||||
self.file_size = len(bytea)
|
self.file_size = len(bytea)
|
||||||
|
self.sha256_hash = sha256_hash
|
||||||
super().save()
|
super().save()
|
||||||
|
|
||||||
def get_bytes(self):
|
def get_bytes(self):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user