From 201e122827dff2446d82a37d5e6f6f2addc30bf0 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Fri, 9 Nov 2018 18:20:08 -0300 Subject: [PATCH] Fix Android image preview (#2323) --- app/components/file_attachment_list/file_attachment_list.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/file_attachment_list/file_attachment_list.js b/app/components/file_attachment_list/file_attachment_list.js index 2698e0192..8ac26bc22 100644 --- a/app/components/file_attachment_list/file_attachment_list.js +++ b/app/components/file_attachment_list/file_attachment_list.js @@ -5,6 +5,7 @@ import React, {Component} from 'react'; import PropTypes from 'prop-types'; import { Keyboard, + Platform, ScrollView, StyleSheet, TouchableOpacity, @@ -100,7 +101,8 @@ export default class FileAttachmentList extends Component { } if (cache) { - uri = cache.path; + const prefix = Platform.OS === 'android' ? 'file://' : ''; + uri = `${prefix}${cache.path}`; } results.push({