Import only black3 submodule

This commit is contained in:
Aroy-Art 2024-02-21 13:43:31 +01:00
parent 9611e8e51f
commit a721d4c97a
Signed by: Aroy
GPG key ID: 583642324A1D2070

View file

@ -5,7 +5,7 @@ from django.http import FileResponse, HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
import os
import blake3
from blake3 import blake3
from .forms import UploadFileForm
from .models import User_Banner_Images, User_Profile_Images, Metadata_Files, Submission_File
@ -23,7 +23,7 @@ def compute_file_hash(file):
Compute BLAKE3 hash of the file
'''
try:
hasher = blake3.blake3()
hasher = blake3()
for chunk in file.chunks(chunk_size=65536):
hasher.update(chunk)
return hasher.hexdigest()