Changed sql-conn to be a function.
Fixed export of zip where charset was incorrect.
Changed upload to accept zip files.