fixed bug to return response when uploading files is complete