Fix uploading iOS videos (#2260)
This commit is contained in:
parent
f6e23a9e0c
commit
94dec5e443
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue