Skip to content

feat: [CHA-926] add global file/image upload methods #1564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025

Conversation

kmitrovv
Copy link
Contributor

CLA

  • I have signed the Stream CLA (required).
  • Code changes are tested

Description of the changes, What, Why and How?

Add support for new global file/image upload endpoints, decoupled from channels.

This change introduces methods for uploading and deleting files/images at the app level, independent of any specific channel. The implementation reuses existing types and mirrors the structure of the channel-based methods, but without requiring a channel context.

Only method definitions are included in this change, as the core logic remains the same.

Changelog

Copy link
Contributor

Size Change: +902 B (+0.21%)

Total Size: 427 kB

Filename Size Change
dist/cjs/index.browser.cjs 123 kB +298 B (+0.24%)
dist/cjs/index.node.cjs 167 kB +304 B (+0.18%)
dist/esm/index.js 136 kB +300 B (+0.22%)

compressed-size-action

@MartinCupela
Copy link
Contributor

@kmitrovv shall we add @deprecation warning to the Channel.sendImage and Channel.sendFile methods?

@MartinCupela
Copy link
Contributor

@kmitrovv should we migrate our existing code that relies on Channel.sendImage and Channel.sendFile?

@kmitrovv
Copy link
Contributor Author

@MartinCupela we're not deprecating the existing upload endpoints, these new ones are separate and will operate at the app level. They’re intended for different use cases, such as uploading user profile images (avatars), which isn’t currently possible due to channel-level permission restrictions.

@kmitrovv kmitrovv merged commit 8e226fb into master Jun 16, 2025
4 checks passed
@kmitrovv kmitrovv deleted the CHA-926/generic-fileimage-upload-endpoint branch June 16, 2025 14:34
github-actions bot pushed a commit that referenced this pull request Jun 18, 2025
## [9.7.0](v9.6.1...v9.7.0) (2025-06-18)

### Bug Fixes

* separate draft event subscriptions and make it a public api ([#1565](#1565)) ([94a9295](94a9295))

### Features

* [CHA-926] add global file/image upload methods ([#1564](#1564)) ([8e226fb](8e226fb))
* add pending message hook config ([#1562](#1562)) ([5d914f7](5d914f7))
* handle offline support for drafts ([#1559](#1559)) ([4a168ef](4a168ef))
* introduce sync search ([#1558](#1558)) ([8e225d5](8e225d5))
* offline drafts issues and optimistic update implementation ([#1566](#1566)) ([570e431](570e431))
@stream-ci-bot
Copy link

🎉 This PR is included in version 9.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants