check file extension on upload and output json
add upload tests and test the complete http api