@@ -26,13 +26,13 def index(request): | |||
|
26 | 26 | siteName, siteList = madWebObj.getSiteInfo() |
|
27 | 27 | err = False |
|
28 | 28 | if request.method == 'POST': |
|
29 | for root, folders, tmp_files in os.walk('/tmp/'): | |
|
29 | for root, folders, tmp_files in os.walk('/madrigal/experiments/tmp/'): | |
|
30 | 30 | for f in tmp_files: |
|
31 | 31 | os.remove(os.path.join(root, f)) |
|
32 | 32 | |
|
33 | 33 | form = UpdataForm(request.POST, request.FILES) |
|
34 |
files = |
|
|
35 | files.sort() | |
|
34 | files = request.FILES.getlist('file') | |
|
35 | # files.sort() | |
|
36 | 36 | filenames = [] |
|
37 | 37 | |
|
38 | 38 | choose = request.POST.get('choose') |
@@ -51,9 +51,9 def index(request): | |||
|
51 | 51 | first = True |
|
52 | 52 | |
|
53 | 53 | if len(files) == 1: |
|
54 | fs = FileSystemStorage(location='/tmp') | |
|
54 | fs = FileSystemStorage(location='/madrigal/experiments/tmp') | |
|
55 | 55 | fs.save(files[0].name, files[0]) |
|
56 | filename = os.path.join('/tmp', files[0].name) | |
|
56 | filename = os.path.join('/madrigal/experiments/tmp', files[0].name) | |
|
57 | 57 | fileInfo = madrigal.data.MadrigalFile(filename, madDB) |
|
58 | 58 | sTime = fileInfo.getEarliestTime() |
|
59 | 59 | startTime = datetime.datetime(sTime[0],sTime[1],sTime[2],sTime[3],sTime[4],sTime[5]) |
@@ -71,8 +71,8 def index(request): | |||
|
71 | 71 | 'An error occur adding file {}: {}'.format(filename.split('/')[-1], e) |
|
72 | 72 | ) |
|
73 | 73 | else: |
|
74 | if os.path.exists(os.path.join('/tmp', 'overview', files[0].name + '.summary')): | |
|
75 | os.remove(os.path.join('/tmp', 'overview', files[0].name + '.summary')) | |
|
74 | if os.path.exists(os.path.join('/madrigal/experiments/tmp', 'overview', files[0].name + '.summary')): | |
|
75 | os.remove(os.path.join('/madrigal/experiments/tmp', 'overview', files[0].name + '.summary')) | |
|
76 | 76 | ext = filename.split('.')[-1] |
|
77 | 77 | if ext not in ('hdf5', 'h5'): |
|
78 | 78 | convert = True |
@@ -89,9 +89,9 def index(request): | |||
|
89 | 89 | filenames.append(filename.split('/')[-1]) |
|
90 | 90 | else: |
|
91 | 91 | for f in files: |
|
92 | fs = FileSystemStorage(location='/tmp') | |
|
92 | fs = FileSystemStorage(location='/madrigal/experiments/tmp') | |
|
93 | 93 | fs.save(f.name, f) |
|
94 | filename = os.path.join('/tmp', f.name) | |
|
94 | filename = os.path.join('/madrigal/experiments/tmp', f.name) | |
|
95 | 95 | ext = filename.split('.')[-1] |
|
96 | 96 | if ext not in ('hdf5', 'h5'): |
|
97 | 97 | convert = True |
General Comments 0
You need to be logged in to leave comments.
Login now