File Upload JWT

Hello,

I used the File Upload component as follows. I use JWT. How can I send the JWT token to the server at the request header؟


  <SfUploader AllowMultiple="true" AutoUpload="true" >

      <UploaderFiles>

        .............

      </UploaderFiles>

      <UploaderAsyncSettings SaveUrl="@strSaveUrl" RemoveUrl="@ strRemoveUrl"></UploaderAsyncSettings>

  </SfUploader>


1 Reply

PK Priyanka Karthikeyan Syncfusion Team May 29, 2024 10:26 AM UTC

Hi Sarah,


The Blazor File Upload component allows you to add an additional header to bind the authentication token during file upload, which can then be received on the server side. To configure the header as a key-value pair, you can achieve this behavior by using the FileSelected and BeforeRemove events and their CurrentRequest arguments. For more information please refer the below KB.

 

https://www.syncfusion.com/blogs/post/blazor-file-upload-jwt-authentication


Regards,

Priyanka K


Loader.
Up arrow icon