When uploading photos, photos were not closed after hashing their contents. A context manager which automatically closes the files would have been nicer, but Django does not allow it.