file-upload fixes