Usage Scenario: Deleting User Avatar Files

In a social media application, when a user changes their profile picture, there is no need to keep the old picture in the bucket. In this case:

  • After the new picture is uploaded, the Delete File From Bucket action is triggered, deleting the old avatar.png.
  • This preserves storage space and prevents unnecessary files from remaining in the system.

Step-by-Step Usage

  1. File Check On the user profile update screen, the Object Key of the old avatar is first retrieved.
  2. Executing the Delete File From Bucket Action It is linked to the OnClick event.
    • Parameters:
      • Object Key: user_123/avatar.png
      • Bucket Name: You can only select AWS or Google as the cloud provider.
      • Encrypt: false
  3. Next Actions
    • If the file is successfully deleted: The new image is uploaded to the Bucket.
    • If deletion fails: A warning such as “File could not be deleted, please try again” is displayed to the user.