diff --git a/archivist/apps/files/views.py b/archivist/apps/files/views.py index 6d042e5..3a96eba 100644 --- a/archivist/apps/files/views.py +++ b/archivist/apps/files/views.py @@ -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()