Fix file downloads in Windows (#1336)

* Fixes an issue where files could not be downloaded when running on Windows
* Closes #1334
This commit is contained in:
Kevin Chung
2020-04-21 15:40:06 -04:00
committed by GitHub
parent 24c3520685
commit fa434c4bdd

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)