From dc4a3a03515b87537a7b50ccf7b975e70a8fd96a Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Mon, 11 May 2020 19:15:46 +0200 Subject: [PATCH] changed cgi --- software_objects/file-upload/upload.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/software_objects/file-upload/upload.cgi b/software_objects/file-upload/upload.cgi index 06839d7..7c31fe7 100644 --- a/software_objects/file-upload/upload.cgi +++ b/software_objects/file-upload/upload.cgi @@ -13,7 +13,7 @@ print () # print "Hello", method # cgi.print_environ() -UPLOADS = "/var/www/uploads/" +from settings import UPLOAD_DIR def upload (inputname, upload_dir): form = cgi.FieldStorage() @@ -31,7 +31,7 @@ def upload (inputname, upload_dir): return bytes, fileitem.filename if method == "POST": - result = upload("thefile", UPLOADS) + result = upload("thefile", UPLOAD_DIR) if result: bytes, filename = result print ("{0} bytes written to {1}
".format(bytes, filename))