I am trying to make a profile pic editor from which we can upload a image directly to s3 bucket and storing the address in mongodb database using multer
But problem is whenever I keep the key of image same. For ex ("profile-image")the picture gets uploaded but does not changes instantly but it changes after some time //5-10 mins later
But when I keep key changing for ex with ${Date.now()}+profile-avatar
Then profile pic changes instantly
Can someone pls help out wheater there is mistake in my code or I have to change my aws s3 bucket settings I am very new to aws s3.