Commit 5a90f603 authored by Romain Therville's avatar Romain Therville 🐭
Browse files

Update to analysis.py

issue #129
parent 884b21b3
......@@ -752,12 +752,14 @@ class Analysis (Component):
return [retcode, str_cmd]
def get_web_filepath(self, file_name, base_filepath='fileadmin' ):
curr_dir=self.directory
#If analysis already exists, retrieve directory from db (need for migration step, to get the real destination directory)
if self.id != None :
t3mysql = t3MySQLdb()
curr_dir= t3mysql.select_analysis_directory(str(self.id))
return base_filepath + os.path.join(curr_dir, file_name)
def get_web_filepath(self, file_name, base_filepath='fileadmin' ):
"""
returns the full web filepath from a given filename
@param file_name : the path to the file to link
@param base_filepath : the first directory in the path (depends on the server's directory structure)
@return : the full web filepath
"""
return base_filepath + os.path.join(self.get_directory(), file_name)
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