Upload files testing & improvements

Maybe worth adding a comment why we do this, as I'm not totally clear.