As I can see here axios/axios#2855, the Authorization header is dropped when redirect.
Here indeed https://api.put.io/v2/files/upload redirects to https://upload.put.io/v2/files/upload and so the Authorization header is dropped and the request cannot be fulfilled.
Because of this we can't use the client.Files.Upload method as this.
As I can see here axios/axios#2855, the
Authorizationheader is dropped when redirect.Here indeed
https://api.put.io/v2/files/uploadredirects tohttps://upload.put.io/v2/files/uploadand so theAuthorizationheader is dropped and the request cannot be fulfilled.Because of this we can't use the
client.Files.Uploadmethod as this.