got uploadfunction to work