【发布时间】:2022-07-11 18:55:35
【问题描述】:
我通过 twilio 消息传递的天才聊天发送图像和 pdf。发送后,我无法在有天赋的聊天 ui 中显示文档。
这是天才聊天将接受的消息对象:
{
_id: 1,
text: 'My message',
createdAt: new Date(Date.UTC(2016, 5, 11, 17, 20, 0)),
user: {
_id: 2,
name: 'React Native',
avatar: 'https://facebook.github.io/react/img/logo_og.png',
},
image: 'https://facebook.github.io/react/img/logo_og.png',
// You can also add a video prop:
video: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4',
// Mark the message as sent, using one tick
sent: true,
// Mark the message as received, using two tick
received: true,
// Mark the message as pending with a clock loader
pending: true,
// Any additional custom parameters are passed through
}
如何在此处附加 pdf(文档)链接,
目前正在附加带有图像键的 pdf url,它返回空白,因为它将该 url 识别为图像。
我怎样才能显示 pdf 而不是空白?
【问题讨论】:
标签: react-native twilio-programmable-chat react-native-gifted-chat