fix fileuploads for both async and sync