Changeset - 889dbcf38c50
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 2 years ago 2021-12-03 00:43:01
ben@sturm.com.au
Remove type annotation.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
www/conservancy/apps/ccs_upload/views.py
Show inline comments
...
 
@@ -25,14 +25,14 @@ def upload(request):
 
    return render(request, 'ccs_upload/upload.html', {'form': form})
 

	
 

	
 
def _handle_uploaded_file(f):
 
    filename = _hash_prefixed_filename(f.name)
 
    path = os.path.join(CCS_UPLOAD_PATH, filename)
 
    with open(path, 'wb+') as destination:
 
        for chunk in f.chunks():
 
            destination.write(chunk)
 
    logger.info('Wrote uploaded file to {}.'.format(path))
 

	
 

	
 
def _hash_prefixed_filename(name: str) -> str:
 
def _hash_prefixed_filename(name):
 
    return '{hash:x} {name}'.format(hash=random.getrandbits(32), name=name)
0 comments (0 inline, 0 general)