Commit ad03a318 authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

Revert "Attempt to solve encoding issue on filename of #102"

This reverts commit a4f043ae
parent 3fc8a6b5
......@@ -2,7 +2,6 @@ import itertools
import json
import os
import tempfile
import unicodedata
import pandas as pd
from basetheme_bootstrap.user_preferences import get_user_preferences_for_user
......@@ -843,17 +842,6 @@ def data_source_download(request, pk):
return response
class ASCIIFileSystemStorage(storage.FileSystemStorage):
Convert unicode characters in name to ASCII characters.
def get_valid_name(self, name):
name = unicodedata.normalize('NFKD', name).encode('ascii', 'ignore')
return super(ASCIIFileSystemStorage, self).get_valid_name(name)
@method_decorator(login_required, name='dispatch')
class DataSourceWizard(wizard_views.NamedUrlSessionWizardView):
def get_upload_or_live_input(self):
......@@ -886,7 +874,7 @@ class DataSourceWizard(wizard_views.NamedUrlSessionWizardView):
"Upload": upload_data,
template_name = 'viralhostrangedb/wizard_form.html'
file_storage = ASCIIFileSystemStorage(location=os.path.join(tempfile.gettempdir(), 'viralhostrangedb_wizard'))
file_storage = storage.FileSystemStorage(location=os.path.join(tempfile.gettempdir(), 'viralhostrangedb_wizard'))
def get_context_data(self, form, step=None, **kwargs):
context = super().get_context_data(form=form, step=step, **kwargs)
Supports Markdown
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