file upload working. sort of. some database issues