Closed f-odc closed 1 month ago
If an user updates the profile image, a new image will get uploaded to Google Storage. The old image has to be deleted.
Some code impression:
ctx := context.Background() // Create a handle to the object obj := client.Bucket(bucketName).Object(objectName) // Delete the object if err := obj.Delete(ctx); err != nil { return fmt.Errorf("failed to delete object: %v", err) }
If an user updates the profile image, a new image will get uploaded to Google Storage. The old image has to be deleted.
Some code impression: