forked from Ivasoft/mattermost-mobile
Fix uploading iOS videos (#2260)
This commit is contained in:
committed by
Saturnino Abril
parent
f6e23a9e0c
commit
94dec5e443
@@ -300,7 +300,8 @@ export default class AttachmentButton extends PureComponent {
|
||||
uploadFiles = async (files) => {
|
||||
const file = files[0];
|
||||
if (!file.fileSize | !file.fileName) {
|
||||
const fileInfo = await RNFetchBlob.fs.stat(file.path);
|
||||
const path = (file.path || file.uri).replace('file://', '');
|
||||
const fileInfo = await RNFetchBlob.fs.stat(path);
|
||||
file.fileSize = fileInfo.size;
|
||||
file.fileName = fileInfo.filename;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user