diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
commit | 1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch) | |
tree | 3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojo/tests/io/upload.cgi | |
parent | 104d59099e048688c4dbac37d72137006e396558 (diff) | |
download | semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2 |
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojo/tests/io/upload.cgi')
-rw-r--r-- | includes/js/dojo/tests/io/upload.cgi | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/includes/js/dojo/tests/io/upload.cgi b/includes/js/dojo/tests/io/upload.cgi deleted file mode 100644 index a13656f..0000000 --- a/includes/js/dojo/tests/io/upload.cgi +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/python - -# FROM: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/273844 - -import cgi -import cgitb; cgitb.enable() -import os, sys -import string - -UPLOAD_DIR = "/tmp/upload/" -form = cgi.FieldStorage() - -dbg = [] - -def debug(dbgstr): - dbg.append(str(dbgstr)) - -def save_uploaded_file(form_field, upload_dir): - global form - if not form.has_key(form_field): - debug("didn't find it! (1)") - return - fileitem = form[form_field] - if not fileitem.file: - debug(form.getvalue(form_field, "")) - debug(fileitem.__dict__) - debug("didn't find it! (2)") - return - fout = file(os.path.join(upload_dir, fileitem.filename), 'wb') - while 1: - chunk = fileitem.file.read(100000) - if not chunk: break - fout.write (chunk) - fout.close() - -retval = "false"; -fileFields = "" - -if form.has_key("fileFields"): - fval = str(form.getvalue("fileFields", "")) - fileFields = fval.split(",") - debug("'fileCount': '" + str(len(fileFields)) + "',") - for field in fileFields: - debug("'fileField' : '"+field + "',") - save_uploaded_file(str(field).strip(), UPLOAD_DIR) - retval = "true"; - -debug("'retval': " + retval) - -print """Content-Type: text/html - - -<html> - <head> - </head> - <body> - <textarea style="width: 100%; height: 100px;">{ %s }</textarea> - </body> -</html> -""" % (string.join(dbg, "\n")) |