Seamless Integration: Setting Bearer Tokens for Endpoint Uploads with Companion Server

I encountered an error while attempting to upload to the target endpoint at http://localhost:54321/storage/v1/upload/resumable. To resolve this, I believe it’s necessary to include an Authorization Bearer ${access_token} in the request. How can I accomplish this?

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

Do you mean the request from companion to the tus server needs to include this header? Or does the request from the browser to companion need the Authorization header?

I mean request from companion to the tus server

In that case, the question is more about Uppy than tus itself. I have moved the topic in the Uppy section of the forum, where somebody with the proper knowledge about Companion can help you.

I saw that you already opened an issue in the Uppy repository, where they are discussing adding the necessary feature.