mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-27 20:42:52 +00:00
feat: add SHA256 hash attribute to knowledge object on save
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
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])
|
||||
self.loid = result['loid']
|
||||
self.file_size = len(bytea)
|
||||
self.sha256_hash = sha256_hash
|
||||
super().save()
|
||||
|
||||
def get_bytes(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue