aws-amplify / aws-amplify/amplify-ui

FileUploader ‑ defaultFiles renders rows without thumbnails/size, and Remove button never deletes the S3 object

Open
#6,550 3 comments 0 reactions 0 assignees View on GitHub
feature-request FileUploader Storage
Dominant language
TypeScript
Stars
1.1k
Forks
347
Avg merge
18h 29m
Merged PRs (30d)
9

Description

### Before creating a new issue, please confirm:

- [x] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-ui/issues?q=is%3Aissue+) and [discussions](https://github.com/aws-amplify/amplify-ui/discussions).
- [x] I have tried disabling all browser extensions or using a different browser
- [x] I have tried deleting the node_modules folder and reinstalling my dependencies
- [x] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-ui/blob/main/CONTRIBUTING.md#bug-reports).

### On which framework/platform are you having an issue?

React

### Which UI component?

Other

### How is your app built?

Vite

### What browsers are you seeing the problem on?

Chrome, Firefox

### Which region are you seeing the problem in?

US East (Ohio) us-east-2

### Please describe your bug.

`` correctly lists the objects I pass in defaultFiles, but:

- Thumbnail preview never loads.
- File size stays blank.
- Clicking the trash / Remove icon visually clears the row, yet the object remains in S3.

This happens even though the keys are valid image files, accessible by getUrl().

![Image](https://github.com/user-attachments/assets/ed5bd509-6e9e-4751-92f3-a272538436c0)

### What's the expected behaviour?

When I preload:
```javascript
defaultFiles={[
{ key: 'file1-key' },
{ key: 'file2-key' }
]}
```

I expect:
1. Each file to show its thumbnail and size.
2. Hitting Remove to delete the object from the bucket.

(Exactly as if the user had just uploaded them.)

### Help us reproduce the bug!

1. Upload two images to your bucket.
2. Render:
```javascript

```
3. Result
- Rows appear but without thumbnails or sizes.
- Clicking the trash icon removes the row in the UI, but the PNG/JPG is still present when you list the bucket

### Code Snippet

_No response_

### Console log output

_No response_

### Additional information and screenshots

I'm using Amplify Gen 2.

Contributor guide

Open the contributing guide

Research direction

The issue does not name implementation files or tests; start by locating the React FileUploader handling for defaultFiles, thumbnail and size loading, and the Remove action. Reproduce with the supplied defaultFiles example and verify that preloaded images display metadata and that Remove deletes the corresponding S3 object.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, react, typescript
Domain
cloud, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.