[FIX] Media share type (#1086)
This commit is contained in:
parent
05936f43f2
commit
22f3e8ef4a
|
@ -132,7 +132,6 @@ export default class ShareListView extends React.Component {
|
|||
description: '',
|
||||
size: data.size,
|
||||
mime: mime.lookup(data.path),
|
||||
store: 'Uploads',
|
||||
path: isIOS ? data.path : `file://${ data.path }`
|
||||
};
|
||||
}
|
||||
|
|
|
@ -112,7 +112,14 @@ export default class ShareView extends React.Component {
|
|||
const { rid, fileInfo, file } = this.state;
|
||||
const { baseUrl: server, user } = this.props;
|
||||
const { name, description } = file;
|
||||
const fileMessage = { ...fileInfo, name, description };
|
||||
const fileMessage = {
|
||||
name,
|
||||
description,
|
||||
size: fileInfo.size,
|
||||
type: fileInfo.mime,
|
||||
store: 'Uploads',
|
||||
path: fileInfo.path
|
||||
};
|
||||
if (fileInfo && rid !== '') {
|
||||
try {
|
||||
await RocketChat.sendFileMessage(rid, fileMessage, undefined, server, user);
|
||||
|
|
Loading…
Reference in New Issue