Fix file downloads in Windows (#1336)

* Fixes an issue where files could not be downloaded when running on Windows
* Closes #1334
in-house-export-serialization
Kevin Chung 2020-04-21 15:40:06 -04:00 committed by GitHub
parent 24c3520685
commit fa434c4bdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import os
import posixpath
import string
from shutil import copyfileobj
@ -54,7 +55,7 @@ class FilesystemUploader(BaseUploader):
filename = secure_filename(filename)
md5hash = hexencode(os.urandom(16))
file_path = os.path.join(md5hash, filename)
file_path = posixpath.join(md5hash, filename)
return self.store(file_obj, file_path)