`PutObject` supports conditional requests as an extension to S3 - so that or sending a `HEAD` reques
PutObject supports conditional requests as an extension to S3 - so that or sending a HEAD request beforehand I supposePutObjectCommand since you'd want to be able to pass the digest of the file into the if-??? header


4xx response back - so that'll want handlingUncaught (in response) Error: internal error when passing req.headers to R2PutOptions#onlyIfreq.headers to R2GetOptions#range
worker.example.com only accept bucket-one but if it's real keys, I can just go to id.r2.cloudflarestorage.com to talk to bucket-two
headers related seems to go delete accepting string[] and everything else included in that release isn't included.try {
for (const file of files) {
const fileStream = fs.readFileSync(file);
const fileName = file.replace(/uploads\//g, '');
console.log(fileName)
const uploadParams: PutObjectCommandInput = {
Bucket: 'test-bucket',
Key: fileName,
Body: fileStream,
ContentLength: fs.statSync(file).size,
ContentType: 'application/octet-stream'
};
const data = await S3.send(new PutObjectCommand(uploadParams));
console.log("Success", data);
}
} catch (err) {
console.log("Error", err);
}