Element-ui drag upload component 401 error

<el-upload
  class="upload-demo"
  drag
  action="https://jsonplaceholder.typicode.com/posts/"
  multiple>
  <i class="el-icon-upload"></i>
  <div class="el-upload__text"><em></em></div>
  <div class="el-upload__tip" slot="tip">jpg/png500kb</div>
</el-upload>

has replaced the connection at action with its own connection, but there is a 401 error. How to solve the problem and ask for the boss"s advice


you should have authentication permissions. Add your header of authentication permissions to yours

clipboard.png


you need to see whether your upload API has API authentication. What parameters need to be sent to the background in what format, not to say that the link should be replaced with its own.
that's a bad question

.
Menu