# Chat Upload Bug

**URL:** https://meta.discourse.org/t/chat-upload-bug/379253
**Category:** Bug
**Tags:** chat
**Created:** [August 19, 2025, 8:31am UTC](https://meta.discourse.org/t/chat-upload-bug/379253 "2025-08-19T08:31:15Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 26, 2025, 6:27am UTC](https://meta.discourse.org/t/chat-upload-bug/379253/6 "2025-08-26T06:27:20Z")

</div>

This is a fantastic catch and spot on. 🤗

Uploads have a user\_id, but that is just the **original** user that created the upload.

Converting that code to:

```ruby
Upload.where(id: params.upload_ids).joins(:user_uploads).where(user_uploads: { user_id: guardian.user.id })

```

will do the trick

Can you send a PR through!

---

_[View the full topic](https://meta.discourse.org/t/chat-upload-bug/379253)._
