Actually froala editor itself appending the timestamp before the file name to avoid naming issue.
You have two option on front-end as well as in back-end,
Front-end:
After getting the AWS hash key, you're setting the value like this,
this.options['imageUploadToS3'] = aws_hash_key;
before this, you can update the keyStart value by using the properties,
data.KeyStart = your_unique_name_come_here;
Back-End:
While getting the AWS hash key API itself you can set the unique name as start value, like this,
const configs = {
bucket: 'stackOverflow',
region: 'us2-west',
keyStart: / + `your_unique_name_come_here`,
acl: 'public-read',
accessKey: XXXXXXXXXXXXXXXXXXXX,
secretKey: XXXXXXXXXXXXXXXXXXXX
};
return FroalaEditor.S3.getHash(configs);