fix for upload of data. autodetection data vs file is ugly.