AWS S3 SDK `client.put_object` does not overwrite the existing data in the bucket

Posted June 17, 2020 860 views
PythonCDNDigitalOcean Spaces

I am using the below upload function to upload in a bucket but this does not overwrite the existing file in the bucket. If I upload an image with a particular format and update the image. The overwrite function does not work.

def upload(byte_stream, path, filename):
    bucket = doconn.get_bucket()
    object_key = os.path.join(path, filename)
    params = dict(
    return object_key
Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!