Perhaps you, like me, passed the string "mimetype" as the third parameter in the client.putFile () function ...
You must pass an object defining the headers of the content type:
client.putFile(localPath, s3Path, {'Content-Type': mimetype} ,function(err, result) {});
or just ignore the third parameter (for example, I did):
client.putFile(localPath, s3Path, function(err, result) {});
source share