# Upload Component - Manual upload

**URL:** <https://forum.radzen.com/t/upload-component-manual-upload/3360>\
**Category:** Blazor Server\
**Created:** [April 22, 2020, 7:32pm UTC](https://forum.radzen.com/t/upload-component-manual-upload/3360 "2020-04-22T19:32:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luke\_O\_Brien](https://forum.radzen.com/user_avatar/forum.radzen.com/luke_o_brien/32/2921_2.png) [@Luke\_O\_Brien](https://forum.radzen.com/u/Luke_O_Brien)\
**Post date:** [April 22, 2020, 7:32pm UTC](https://forum.radzen.com/t/upload-component-manual-upload/3360/1 "2020-04-22T19:32:21Z")

</div>

Hello there,

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.

```auto
        [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.

Thanks,

Luke

---

<div class="post-metadata">

**Author:** ![Luke\_O\_Brien](https://forum.radzen.com/user_avatar/forum.radzen.com/luke_o_brien/32/2921_2.png) [@Luke\_O\_Brien](https://forum.radzen.com/u/Luke_O_Brien)\
**Post date:** [April 22, 2020, 7:36pm UTC](https://forum.radzen.com/t/upload-component-manual-upload/3360/2 "2020-04-22T19:36:10Z")

</div>

I just see on your [docs](https://www.radzen.com/documentation/blazor/upload/#events) under the **Description** for `Progess`:

> Upload Loaded, Total bytes and Percent as argument.

So does the `UploadProgressArgs` contain the returned response?

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [April 23, 2020, 7:23am UTC](https://forum.radzen.com/t/upload-component-manual-upload/3360/3 "2020-04-23T07:23:41Z")

</div>

Hi @Luke_O_Brien,

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.

---

<div class="post-metadata">

**Author:** ![Luke\_O\_Brien](https://forum.radzen.com/user_avatar/forum.radzen.com/luke_o_brien/32/2921_2.png) [@Luke\_O\_Brien](https://forum.radzen.com/u/Luke_O_Brien)\
**Post date:** [April 23, 2020, 8:09am UTC](https://forum.radzen.com/t/upload-component-manual-upload/3360/4 "2020-04-23T08:09:02Z")

</div>

Hey thanks - That's great!  
(No hurry)

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [April 23, 2020, 8:13am UTC](https://forum.radzen.com/t/upload-component-manual-upload/3360/5 "2020-04-23T08:13:48Z")

</div>

Radzen.Blazor and [the updated demo](https://blazor.radzen.com/example-upload) just published. Radzen release will follow! 🙂

---

<div class="post-metadata">

**Author:** ![Luke\_O\_Brien](https://forum.radzen.com/user_avatar/forum.radzen.com/luke_o_brien/32/2921_2.png) [@Luke\_O\_Brien](https://forum.radzen.com/u/Luke_O_Brien)\
**Post date:** [April 23, 2020, 8:43am UTC](https://forum.radzen.com/t/upload-component-manual-upload/3360/6 "2020-04-23T08:43:07Z")

</div>

Thank that's really awesome - and all for little old me.

But in your haste I think you made some mistakes:  
The `Completed` handler has a spelling mistake:

```auto
void Copmleted(UploadCompleteEventArgs args)
{
    events.Add(DateTime.Now, $"Server response: {args.RawResponse}");
}

```

And you have not attached to `Completed` or `Error` handlers to the `Upload` component in markup:

```auto
<RadzenUpload @ref="upload" Auto="false" Url="upload/single" Style="margin-bottom: 20px;"
              Progress="@((args) => OnProgress(args, "Manual Upload"))" />
<RadzenButton Text="Upload" Click="@(args => upload.Upload())" />

```

😉

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [April 23, 2020, 8:46am UTC](https://forum.radzen.com/t/upload-component-manual-upload/3360/7 "2020-04-23T08:46:29Z")

</div>

I’ve fixed the typo, thanks. The event is attached to last Upload component only.

---

<div class="post-metadata">

**Author:** ![Luke\_O\_Brien](https://forum.radzen.com/user_avatar/forum.radzen.com/luke_o_brien/32/2921_2.png) [@Luke\_O\_Brien](https://forum.radzen.com/u/Luke_O_Brien)\
**Post date:** [April 23, 2020, 9:15am UTC](https://forum.radzen.com/t/upload-component-manual-upload/3360/8 "2020-04-23T09:15:56Z")

</div>

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`.
