Import only black3 submodule
This commit is contained in:
parent
9611e8e51f
commit
a721d4c97a
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue