Fix handling non-ascii filenames in uploads