s3.putObject({
Bucket: bucketName,
Key: fileName,
Body: file,
ACL: \'bucket-owner-full-control\'
}, function(err, data) {
i
I guess you've encountered the default caching mechanism which is 24 hours, this results in not receiving the latest stored object. To override this, add parameter to putObject():
CacheControl: "no-cache"
or Expires: new Date()
By default, when you upload the file with same name. It will overwrite the existing file. In case you want to have the previous file available, you need to enable versioning in the bucket.