Yes, You are using
async void
which is
fire and forget. This means that you are not waiting for the asynchronous operation to finish.
Change:
private async void CreateFile(string savePath, IFormFile formFile)
TO:
private async Task CreateFile(string savePath, IFormFile formFile)
Then change:
CreateFile($"{_environment.WebRootPath}{Constants.SaveCompanyImagePath}", info.company_logo_url);
TO:
await CreateFile($"{_environment.WebRootPath}{Constants.SaveCompanyImagePath}", info.company_logo_url);
Now the code will wait for the asynchronous operation to finish.