[FIX] Allow special chars in Filename (#2020)

* fixed-filename-issue

* improve

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Prateek Jain 2020-04-30 23:50:29 +05:30 committed by GitHub
parent 6d80f147ac
commit 2b9c447fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ export function sendFileMessage(rid, fileInfo, tmid, server, user) {
formData.append('file', {
uri: fileInfo.path,
type: fileInfo.type,
name: fileInfo.name || 'fileMessage'
name: encodeURI(fileInfo.name) || 'fileMessage'
});
if (fileInfo.description) {

View File

@ -35,7 +35,7 @@ class AttachmentView extends React.Component {
const handleSave = navigation.getParam('handleSave', () => {});
const { title } = attachment;
const options = {
title,
title: decodeURI(title),
...themedHeader(theme),
headerRight: <SaveButton testID='save-image' onPress={handleSave} />
};