upload_file: test floats and fix a bug therein