From 94dec5e443c13c60bc4ea6dcfdc7c78be90ea774 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Fri, 12 Oct 2018 06:32:18 -0300 Subject: [PATCH] Fix uploading iOS videos (#2260) --- app/components/attachment_button.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/components/attachment_button.js b/app/components/attachment_button.js index b7198a2cf8..4a5140bfc9 100644 --- a/app/components/attachment_button.js +++ b/app/components/attachment_button.js @@ -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; }