Commit 826365b4 authored by Ryan Herbert's avatar Ryan Herbert

file.py jstree filename management

jstree returns a path to the desired file, so we need to manage that
filename appropriately
parent d804fd51
......@@ -185,10 +185,18 @@ def add_form():
if error=="" :
filename = request.vars['filename']
data_file = None
filepath = ""
name_list = []
if request.vars['filename'] != "":
name_list = request.vars['filename'].split('/')
filename = name_list[-1]
#add sequence_file to the db
id = db.sequence_file.insert(sampling_date=request.vars['sampling_date'],
info=request.vars['file_info'],
filename=request.vars['filename'],
filename=filename,
pre_process_id=pre_process,
pre_process_flag=pre_process_flag,
provider=auth.user_id)
......
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