MediaUpload: videoURL

dev/chat
Lei OT 2 years ago
parent 9540b22eba
commit 9972a093b8

@ -45,6 +45,7 @@ const mediaMsg = {
...msg,
actionId: msg.id,
conversationid: msg.id.split('.')[0],
data: { ...msg.data, status: {download: true, click: true,}},
...(msg.context
? {
reply: {

@ -84,11 +84,15 @@ const ImageUpload = ({ disabled }) => {
}
if (info.file.status === 'done') {
//
setComplexMsg({...complexMsg, status: info.file.status, data: { ...complexMsg.data, uri: complexMsg.data.dataUri}})
setComplexMsg({
...complexMsg,
status: info.file.status,
data: { ...complexMsg.data, uri: complexMsg.data.dataUri, [`${complexMsg.type}URL`]: complexMsg.data.dataUri },
});
// message.success(`${info.file.name} file uploaded successfully`);
} else if (info.file.status === 'error') {
message.error(`添加失败`);
setComplexMsg({ ...complexMsg, status: info.file.status, data: { ...complexMsg.data, uri: ''} })
setComplexMsg({ ...complexMsg, status: info.file.status, data: { ...complexMsg.data, uri: '', [`${complexMsg.type}URL`]: '' } });
}
}}
>

Loading…
Cancel
Save