Commit c40d7521 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

file.py update manage_filename

use the correct field identifiers with ids and such to decode the
filename correctly to ensure the filename is correct in the database and
the correct upload method is detected
parent 001bf9e4
......@@ -27,13 +27,13 @@ def extract_set_type(target):
def manage_filename(filename):
filepath = ""
name_list = []
name_list = request.vars['filename'].split('/')
filename = name_list[-1]
data = dict(filename=filename, data_file=None)
name_list = filename.split('/')
myfilename = name_list[-1]
data = dict(filename=myfilename, data_file=None)
if len(name_list) > 1:
filepath = defs.FILE_SOURCE + '/' + request.vars['filename']
split_file = filename.split('.')
filepath = defs.FILE_SOURCE + '/' + filename
split_file = myfilename.split('.')
uuid_key = db.uuid().replace('-', '')[-16:]
encoded_filename = base64.b16encode('.'.join(split_file[0:-1])).lower()
data_file = "sequence_file.data_file.%s.%s.%s" % (
......
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