jQuery-File-Upload by blueimp - additional headers

前端 未结 5 1833
野的像风
野的像风 2021-02-05 11:19

I\'ve searched through wiki but couldn\'t find an answer where should I put my additional headers (for example Authorization header) in JS script? Somewhere o

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-05 12:05

    Here is my implementation

    onSend: function(e, options) {
      var accessToken = ...;
    
      options.headers = {
        'Authorization': 'Bearer ' + accessToken
      };
    },
    

提交回复
热议问题