How to upload a file with the same name to Amazon S3 and overwrite existing file?
<pre class="lang-js prettyprint-override"><code>s3.putObject({
        Bucket: bucketName,
        Key: fileName,
        Body: file,
        ACL: 'bucket-owner-full-control'
    }, function(err, data) {
        if (err) {
            console.log(err);
        }
        console.log(data)
    }
);
</code></pre>
<p>I use this code to upload image to my Amazon S3 cloud storage. But I can't upload a file with the same name (this name exist on the server S3 already).</p>
<p>How can I upload a file with the same name and overwrite the already existing one in S3?</p>
<p>Thanks for any help :)</p>