diff --git a/app/components/post_draft/quick_actions/file_quick_action/index.js b/app/components/post_draft/quick_actions/file_quick_action/index.js index 536b9ec97..337f7b859 100644 --- a/app/components/post_draft/quick_actions/file_quick_action/index.js +++ b/app/components/post_draft/quick_actions/file_quick_action/index.js @@ -68,8 +68,10 @@ export default class FileQuickAction extends PureComponent { } } - // Decode file uri to get the actual path - res.uri = decodeURIComponent(res.uri); + if (Platform.OS === 'ios') { + // Decode file uri to get the actual path + res.uri = decodeURIComponent(res.uri); + } this.props.onUploadFiles([res]); } catch (error) { diff --git a/app/utils/file.test.js b/app/utils/file.test.js index 25430d79f..1e36ebdf3 100644 --- a/app/utils/file.test.js +++ b/app/utils/file.test.js @@ -1,7 +1,11 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. -import {generateId, getLocalFilePathFromFile, getExtensionFromContentDisposition} from 'app/utils/file'; +import { + generateId, + getLocalFilePathFromFile, + getExtensionFromContentDisposition, +} from 'app/utils/file'; describe('getExtensionFromContentDisposition', () => { it('should return the extracted the extension', () => {