Title: Alternative way to assign image attachments to a channel? · Issue #161 · GetStream/stream-chat-java · GitHub
Open Graph Title: Alternative way to assign image attachments to a channel? · Issue #161 · GetStream/stream-chat-java
X Title: Alternative way to assign image attachments to a channel? · Issue #161 · GetStream/stream-chat-java
Description: As far as I can tell, the only way to assign an attachment to a channel is using the “file” property, which is the CDN URL. Those URLs are signed, and so I’m concerned about them expiring after 14 days, and the images would no longer be ...
Open Graph Description: As far as I can tell, the only way to assign an attachment to a channel is using the “file” property, which is the CDN URL. Those URLs are signed, and so I’m concerned about them expiring after 14 ...
X Description: As far as I can tell, the only way to assign an attachment to a channel is using the “file” property, which is the CDN URL. Those URLs are signed, and so I’m concerned about them expiring after 14 ...
Opengraph URL: https://github.com/GetStream/stream-chat-java/issues/161
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Alternative way to assign image attachments to a channel?","articleBody":"As far as I can tell, the only way to assign an attachment to a channel is using the “file” property, which is the CDN URL. Those URLs are signed, and so I’m concerned about them expiring after 14 days, and the images would no longer be viewable in the channel. Is this true? Or is there another way to upload attachments to avoid this issue?\r\n\r\n\r\n\r\nThis does not seem to be the same way you can upload attachments in the Node SDK. There, you can pass attachments directly, which would give me a little more confidence.\r\n\r\n```js\r\nconst promises = [\r\n channel.sendImage(\r\n fs.createReadStream('./cat.png'),\r\n 'cat.jpg',\r\n 'cat/jpg',\r\n {id: \"some-user\"}\r\n ),\r\n ];\r\n \r\n const results = await Promise.all(promises);\r\n const attachments = results.map(response =\u003e {\r\n return {\r\n type: 'image',\r\n thumb_url: response.file,\r\n asset_url: response.file,\r\n };\r\n });\r\n\r\n const response = await channel.sendMessage({\r\n text: 'I have uploaded things.',\r\n attachments,\r\n user\r\n });\r\n\r\n```","author":{"url":"https://github.com/alexmacarthur","@type":"Person","name":"alexmacarthur"},"datePublished":"2024-11-26T20:33:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/161/stream-chat-java/issues/161"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b7b3f864-c672-ac15-0531-812cb6ebc978 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9406:62FFD:11763D1:168C9D0:698FD84E |
| html-safe-nonce | 3b245739a3839de15d71fefd8b7cdeb2e48e4211062101733c5142c6c598cfd5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDA2OjYyRkZEOjExNzYzRDE6MTY4QzlEMDo2OThGRDg0RSIsInZpc2l0b3JfaWQiOiI1NTM2MDI3ODc5MjUzNDY1MTY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e4efc2661df0beeeacc62ed2c960b5e38d858a082b088117d56d7c56e1cf19ce |
| hovercard-subject-tag | issue:2695995385 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/GetStream/stream-chat-java/161/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0f652739a7c1f762a421ee9a10d6d366f286ab035feca47eb78b6ae11a7f2ebc/GetStream/stream-chat-java/issues/161 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0f652739a7c1f762a421ee9a10d6d366f286ab035feca47eb78b6ae11a7f2ebc/GetStream/stream-chat-java/issues/161 |
| og:image:alt | As far as I can tell, the only way to assign an attachment to a channel is using the “file” property, which is the CDN URL. Those URLs are signed, and so I’m concerned about them expiring after 14 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alexmacarthur |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/GetStream/stream-chat-java git https://github.com/GetStream/stream-chat-java.git |
| octolytics-dimension-user_id | 8597527 |
| octolytics-dimension-user_login | GetStream |
| octolytics-dimension-repository_id | 177873569 |
| octolytics-dimension-repository_nwo | GetStream/stream-chat-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 177873569 |
| octolytics-dimension-repository_network_root_nwo | GetStream/stream-chat-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d320682233dfd4d28c0b30554a564c2fcd229032 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width