Hi All,
I’m new to Postman but have been able to put a file to an S3 bucket using a presigned URL received from the bucket provider.
I need to be able to put a file to the same S3 using Node JS (also very new to node) so I took the node js native code generated by Postman and modified it to suit my needs and run it via the console on my local machine. It works fine in that it connects but the issue I have is being able to code the part to include the file contents:
var postData = “”;
I’ve tried:
var postData = “path-to-file/11707658.pdf”;
and
var postData = fs.readFileSync(‘path-to-file/11707658.pdf’);
But the response I get from S3 in the console is:
NotImplemented
A header you provided implies functionality that is not implemented…
I’m assuming it is because I haven’t included the file contents correctly.
Would you be able to tell me how to go about getting the file contents? Do I need to convert to binary in some way?
Any advice would be greatly appreciated.
Many thanks in advance.