Uppy companion: How to set Bearer Tokens for Endpoint Uploads with Companion Server

41 Views Asked by At

While using the standalone Companion server, I encountered an error while attempting to upload to the target endpoint at http://localhost:54321/storage/v1/upload/resumable. It seems that adding an Authorization Bearer ${access_token} to the request is required to rectify this problem.

Could anyone guide me on how to implement this, specifically within the context of a standalone or customized Companion server setup?

companion: 2024-02-21T06:33:25.179Z [error] f062fb22 uploader.error DetailedError: tus: unexpected response while creating upload, originated from request 
(method: POST,
 url: http://localhost:54321/storage/v1/upload/resumable, 
response code: 400,
 response text: 
{"message":"jwt must be provided","statusCode":"400","error":"jwt must be provided"},
 request id: 207ab335-7325-44f0-aaa2-5a0159373009)
    at Upload._emitHttpError (/node_modules/tus-js-client/lib.es5/upload.js:872:23)
    at node_modules/tus-js-client/lib.es5/upload.js:993:18
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  causingError: null
}
0

There are 0 best solutions below