[MM-26489] No need to decode file URI on Android (#4610)
* Encode lone % chars * No need to decode on Android
This commit is contained in:
parent
ef7db846f7
commit
7c827fe319
2 changed files with 9 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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', () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue