You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
This 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.
constpromises=[channel.sendImage(fs.createReadStream('./cat.png'),'cat.jpg','cat/jpg',{id: "some-user"}),];constresults=awaitPromise.all(promises);constattachments=results.map(response=>{return{type: 'image',thumb_url: response.file,asset_url: response.file,};});constresponse=awaitchannel.sendMessage({text: 'I have uploaded things.',
attachments,
user
});
The text was updated successfully, but these errors were encountered:
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?
This 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.
The text was updated successfully, but these errors were encountered: