Axios retry file upload (PUT method) with interceptor

339 views Asked by At

The issue I face is that my axios interceptor is not retrying file upload requests using PUT method.

If my JWT tokens expire in the process of trying to upload the file my interceptor refreshes them but doesn't retry the file request upload, all other requests work and get retried once the tokens are refreshed. Wasn't able to find a solid answer to this problem so before sharing a ton of code just wanted to check if this is common.

So my question is this the desired behavior? What would be the workaround? Do a token refresh each time before calling upload request?

My current interceptor looks something as follows:

enter image description here

Thank you for any pointers/help!

0

There are 0 answers