Commit 1a596233 authored by fred's avatar fred

fix utf-8 encoding of filenames

parent 31b50e33
...@@ -203,9 +203,9 @@ class UploadTracksView(FormView): ...@@ -203,9 +203,9 @@ class UploadTracksView(FormView):
datetime.datetime.today().strftime('%y%m%d'), datetime.datetime.today().strftime('%y%m%d'),
artist_name[:50].replace('/', ' ').strip(), artist_name[:50].replace('/', ' ').strip(),
track_title[:80].replace('/', ' ').strip(), track_title[:80].replace('/', ' ').strip(),
os.path.splitext(f.name)[-1]).encode('utf-8') os.path.splitext(f.name)[-1])
default_storage.save(os.path.join('nonstop', 'tracks', filepath), content=f) default_storage.save(os.path.join('nonstop', 'tracks', filepath.encode('utf-8')), content=f)
nonstop_file = NonstopFile() nonstop_file = NonstopFile()
nonstop_file.set_track_filepath(filepath) nonstop_file.set_track_filepath(filepath)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment