0

I am having a problem sending an authorization header with dropzonejs

  this.componentConfig = {
      iconFiletypes: ['.jpg', '.png', '.gif'],
      showFiletypeIcon: true,
      postUrl: `${getBaseUrl()}/Controller/ImportImage`,
      headers: {
        'Authorization': 'Bearer'
      },
    };


  <DropzoneComponent config={config} eventHandlers={eventHandlers} djsConfig={djsConfig}> </DropzoneComponent>
chobo2
  • 83,322
  • 195
  • 530
  • 832

1 Answers1

1

Based on the code the headers are define like:

var headers = {
    "Accept": "application/json",
    "Cache-Control": "no-cache",
    "X-Requested-With": "XMLHttpRequest"
  };

So, defining like

headers: { "Authorization" : "Bearer AbCdEf123456" } 

should work.

mmsilviu
  • 1,211
  • 15
  • 25