Skip to content

Commit

Permalink
Fix uploading iOS videos (#2260)
Browse files Browse the repository at this point in the history
  • Loading branch information
enahum authored and saturninoabril committed Oct 12, 2018
1 parent f6e23a9 commit 94dec5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/attachment_button.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 94dec5e

Please sign in to comment.