I'm getting error 405 while trying to upload files from client side in JMeter. I've also tried recording scripts but that doesn't seem to work because it doesn't capture needed action. Everything works fine when done in the web browser and I don't get then any errors, but when it comes to testing in JMeter the error appears.
I have an application written in ReactJS and SpringBoot.
As per your server response you're allowed to only send GET and HEAD methods while file upload is possible with POST and PUT so most probably you either need to ensure that your URL is correct or it might be the case you need to be authenticated prior to uploading the file and this authentication logic fails somewhere somehow.
If you properly configure JMeter and the web browser for recording, to wit:
you should be able to record your browser's HTTP and HTTPS traffic and JMeter should generate relevant HTTP Request sampler(s) and HTTP Header Manager(s) so you should be able to replay your script (some correlation may be still required)