[FIX] Media share type (#1086)

This commit is contained in:
Djorkaeff Alexandre 2019-07-30 13:15:39 -03:00 committed by Diego Mello
parent 05936f43f2
commit 22f3e8ef4a
2 changed files with 8 additions and 2 deletions

View File

@ -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 }`
};
}

View File

@ -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);