diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a47971..a7a85bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Upcoming... +* disabling axios response auto-transformation when editing content, fixes #110 +* config params: .json and .md extensions added as 'editable' by default + ## 7.4.2 - 2020-07-18 * inclusive terminology: BC! please replace ip_whitelist/ip_blacklist to ip_allowlist/ip_denylist in your configuration.php diff --git a/configuration_sample.php b/configuration_sample.php index b5fd656..03a749c 100644 --- a/configuration_sample.php +++ b/configuration_sample.php @@ -14,7 +14,7 @@ return [ 'upload_chunk_size' => 1 * 1024 * 1024, // 1MB 'upload_simultaneous' => 3, 'default_archive_name' => 'archive.zip', - 'editable' => ['.txt', '.css', '.js', '.ts', '.html', '.php'], + 'editable' => ['.txt', '.css', '.js', '.ts', '.html', '.php', '.json', '.md'], 'date_format' => 'YY/MM/DD hh:mm:ss', // see: https://momentjs.com/docs/#/displaying/format/ 'guest_redirection' => '', // useful for external auth adapters ], diff --git a/docs/configuration/basic.md b/docs/configuration/basic.md index 10fa46b..d0e62fa 100644 --- a/docs/configuration/basic.md +++ b/docs/configuration/basic.md @@ -21,7 +21,7 @@ Note: if you've made a mistake in configuration file (forgot to close a quote?) 'upload_chunk_size' => 1 * 1024 * 1024, // 1MB 'upload_simultaneous' => 3, 'default_archive_name' => 'archive.zip', - 'editable' => ['.txt', '.css', '.js', '.ts', '.html', '.php'], + 'editable' => ['.txt', '.css', '.js', '.ts', '.html', '.php', '.json', '.md'], 'date_format' => 'YY/MM/DD hh:mm:ss', // see: https://momentjs.com/docs/#/displaying/format/ 'guest_redirection' => '', // useful for external auth adapters ], diff --git a/frontend/api/api.js b/frontend/api/api.js index 4c034cb..a706323 100644 --- a/frontend/api/api.js +++ b/frontend/api/api.js @@ -194,7 +194,9 @@ const api = { downloadItem (params) { return new Promise((resolve, reject) => { axios.get('download&path='+encodeURIComponent(Base64.encode(params.path)), - {transformResponse : undefined}) + { + transformResponse: undefined, + }) .then(res => resolve(res.data)) .catch(error => reject(error)) }) diff --git a/tests/backend/configuration.php b/tests/backend/configuration.php index b4a0476..cc4e6ee 100644 --- a/tests/backend/configuration.php +++ b/tests/backend/configuration.php @@ -13,7 +13,7 @@ return [ 'upload_chunk_size' => 1 * 1024 * 1024, 'upload_simultaneous' => 3, 'default_archive_name' => 'archive.zip', - 'editable' => ['.txt', '.css', '.js', '.ts', '.html', '.php'], + 'editable' => ['.txt', '.css', '.js', '.ts', '.html', '.php', '.json', '.md'], 'date_format' => 'YY/MM/DD hh:mm:ss', 'guest_redirection' => '', // useful for external auth adapters ],