Before a few days I had the idea that it would be really nice if we could have a database of greek theses and dissertations, about mathematics and science in general. From what i know, there are a few databases around, mostly for Electrical Engineering and Computer Science dissertations. So, I thought that it would be a good opportunity for me to exercise my CGI and Python Web scripting skills.
And here I am, presenting the Thesis Database project. I hope that it will be useful and people will contribute.

But while coding the CGI backbone, I had a few problems to solve, so since i had to come up with the solutions (couldn’t find anything useful online), i decided to post them here, for future reference. I will also give the basic idea of how a python cgi uploading script works. The focus is on security of the code.
So, the following is a very simple html form, which will be used as the user interface for the upload.
We suppose that the cgi script is called upload.py and is placed inside the $Web root$/cgi-bin/ directory.
upload.html
<html>
<head> <title>Upload Example</title> </head>
<body> <div align=”center”>
<form action=”/cgi-bin/upload.py” method=”POST” enctype=”multipart/form-data”>
File : <input name=”file” type=”file” size=”35″><BR>
<P><input name=”submit” type=”submit” value=”Upload”></div> </body> </html>




