Skip to content
This repository was archived by the owner on Nov 22, 2019. It is now read-only.

Commit 1b90bd9

Browse files
author
mfe
committed
Merge branch 'develop'
2 parents 3b7fd92 + 7e5b40e commit 1b90bd9

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

plotThatLut/plot_that_lut.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ def show_plot(fig, filename):
5858
split_filename = os.path.splitext(filename)
5959
filename = '{0}{1}'.format(split_filename[0],
6060
split_filename[1].replace(".", "_"))
61+
currdir = os.path.dirname(os.path.abspath(__file__))
6162
export_path = 'img/export_{0}.png'.format(filename)
62-
fig.savefig(export_path)
63+
abs_export_path = '{0}/img/export_{1}.png'.format(currdir, filename)
64+
fig.savefig(abs_export_path)
6365
return export_path
6466
else:
6567
matplotlib.pyplot.show()
@@ -175,9 +177,6 @@ def plot_cube(lutfile, cube_size, processor):
175177
return show_plot(fig, filename)
176178

177179

178-
179-
180-
181180
def supported_formats():
182181
"""Return supported formats
183182

plotThatLut/plot_that_lut_web.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"""
88

99
from os import path
10+
import ntpath
1011
import sys
1112
import traceback
1213

@@ -111,7 +112,9 @@ def __copyUploadedFile(upfile):
111112
break
112113
all_data += data
113114
# copy uploaded file on the server
114-
backup_filename = "uploads/{0}".format(upfile.filename)
115+
backup_filename = "{0}/uploads/{1}".format(currdir,
116+
ntpath.basename(
117+
upfile.filename))
115118
saved_file = open(backup_filename, 'wb')
116119
saved_file.write(all_data)
117120
saved_file.close()

0 commit comments

Comments
 (0)