RadzenUpload URL Post

<RadzenUpload Multiple="true"
                              Accept=".pdf,.doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/*"
                              ChooseText="Select Files to Upload"
                              Style="margin-bottom: 20px;"
                              Progress="@((args) => OnProgress(args, "Multiple files upload",_document.Description, _document.RateCardVersionId))"
                              Url="@($"upload/multiple/{_document.RateCardVersionId}/{_document.Description}")"  />

How Can I prevent the POST method from being fired when files were chosen?
I want to submit the files only when I click on Save button

  <RadzenButton Icon="save" 
                          Style="width:125px;bottom:0;margin-bottom:10px;right:10px; position:absolute;" 
                          Text="Save" 
                          ButtonStyle="ButtonStyle.Success" 
                          ButtonType="ButtonType.Submit"
                          Click="@Post"/>

But the Controller
[HttpPost("upload/multiple/{RateCardVersionId}/{Description}")]
public async Task Multiple(IFormFile[] files, long? RateCardVersionId, string Description)
Does not receive IFormFile[] files.

Hi @F_D,

This isn't possible at the moment. The Radzen Upload posts the files on its own in order to track the progress. If you need to upload files together with a form you could use <input type="file">.

1 Like