I would like to await the returned result of a file upload.
I have an exsisting Web API that saves an IFormFile to the database as bytes and saves information about that file (title, MIMI type etc) into another table.
This information is returned to the client.
[Route("upload")]
[HttpPost]
public async Task<IActionResult> Upload(List<IFormFile> files)
{
var resourceInfos = await service.UploadResources(files);
return Ok(resourceInfos);
}
Your upload component performs the upload automaticly, I need a boolean that will prevent the automatic upload and a click event so that I can manually perform the upload.
We will add Auto property (true by default) to control if the the upload should start immediately or not. Upload() method will be added also to start manually the upload process. We will provide also Complete event with the response returned from server. The update will be available later today or tomorrow.
Ahh okay, didn't see that last one.
You know you could add the Complete to all of the components and remove the last one as it doesn't demonstrate anything different than the normal Upload.