mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-02 12:17:59 +00:00
Merge branch '1074-introduce-environment-variable-to-disable-google-docs-file-preview' into 'develop'
Resolve "Introduce environment variable to disable Google docs file preview" Closes #1074 See merge request bramw/baserow!899
This commit is contained in:
commit
155c09b755
9 changed files with 19 additions and 3 deletions
|
@ -93,6 +93,7 @@ DATABASE_NAME=baserow
|
|||
|
||||
# BASEROW_DISABLE_PUBLIC_URL_CHECK=
|
||||
# DOWNLOAD_FILE_VIA_XHR=
|
||||
# BASEROW_DISABLE_GOOGLE_DOCS_FILE_PREVIEW=
|
||||
|
||||
# BASEROW_PLUGIN_GIT_REPOS=
|
||||
# BASEROW_PLUGIN_URLS=
|
||||
|
|
|
@ -23,6 +23,7 @@ For example:
|
|||
* Fixed bug with 404 middleware returning different 404 error messages based on the endpoint.
|
||||
* Made it possible to import data into an existing table. [#342](https://gitlab.com/bramw/baserow/-/issues/342)
|
||||
* Tables can now be duplicated. [#961](https://gitlab.com/bramw/baserow/-/issues/961)
|
||||
* Introduced environment variable to disable Google docs file preview. [#1074](https://gitlab.com/bramw/baserow/-/issues/1074)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
|
|
@ -153,6 +153,7 @@ services:
|
|||
BASEROW_DISABLE_PUBLIC_URL_CHECK:
|
||||
INITIAL_TABLE_DATA_LIMIT:
|
||||
DOWNLOAD_FILE_VIA_XHR:
|
||||
BASEROW_DISABLE_GOOGLE_DOCS_FILE_PREVIEW:
|
||||
HOURS_UNTIL_TRASH_PERMANENTLY_DELETED:
|
||||
DISABLE_ANONYMOUS_PUBLIC_VIEW_WS_CONNECTIONS:
|
||||
FEATURE_FLAGS:
|
||||
|
|
|
@ -143,6 +143,7 @@ services:
|
|||
BASEROW_DISABLE_PUBLIC_URL_CHECK:
|
||||
INITIAL_TABLE_DATA_LIMIT:
|
||||
DOWNLOAD_FILE_VIA_XHR:
|
||||
BASEROW_DISABLE_GOOGLE_DOCS_FILE_PREVIEW:
|
||||
HOURS_UNTIL_TRASH_PERMANENTLY_DELETED:
|
||||
DISABLE_ANONYMOUS_PUBLIC_VIEW_WS_CONNECTIONS:
|
||||
FEATURE_FLAGS:
|
||||
|
|
|
@ -164,6 +164,7 @@ services:
|
|||
BASEROW_DISABLE_PUBLIC_URL_CHECK:
|
||||
INITIAL_TABLE_DATA_LIMIT:
|
||||
DOWNLOAD_FILE_VIA_XHR:
|
||||
BASEROW_DISABLE_GOOGLE_DOCS_FILE_PREVIEW:
|
||||
HOURS_UNTIL_TRASH_PERMANENTLY_DELETED:
|
||||
DISABLE_ANONYMOUS_PUBLIC_VIEW_WS_CONNECTIONS:
|
||||
FEATURE_FLAGS:
|
||||
|
|
|
@ -143,6 +143,7 @@ The installation methods referred to in the variable descriptions are:
|
|||
| DOWNLOAD\_FILE\_VIA\_XHR | Set to \`1\` to force download links to download files via XHR query to bypass \`Content-Disposition: inline\` that can't be overridden in another way. If your files are stored under another origin, you also must add CORS headers to your server. | 0 |
|
||||
| BASEROW\_DISABLE\_PUBLIC\_URL\_CHECK | When opening the Baserow login page a check is run to ensure the PUBLIC\_BACKEND\_URL/BASEROW\_PUBLIC\_URL variables are set correctly and your browser can correctly connect to the backend. If misconfigured an error is shown. If you wish to disable this check and warning set this to any non empty value. | |
|
||||
| ADDITIONAL\_MODULES | **Internal** A list of file paths to Nuxt module.js files to load as additional Nuxt modules into Baserow on startup. | |
|
||||
| BASEROW\_DISABLE\_GOOGLE\_DOCS\_FILE\_PREVIEW | Set to \`true\` or \`1\` to disable Google docs file preview. | |
|
||||
|
||||
### `baserow/baserow` Image only Configuration
|
||||
|
||||
|
|
|
@ -94,10 +94,12 @@ are accepted.
|
|||
download files via XHR query to bypass `Content-Disposition: inline` that
|
||||
can't be overridden in another way. If your files are stored under another
|
||||
origin, you also must add CORS headers to your server.
|
||||
* `BASEROW_DISABLE_GOOGLE_DOCS_FILE_PREVIEW` (default ``): Set to `true` or `1` to
|
||||
disable Google docs file preview in the web-frontend.
|
||||
* `PUBLIC_BACKEND_URL` (default `http://localhost:8000`): The publicly accessible URL of
|
||||
the backend. For the development environment this is `http://localhost:8000`, but if
|
||||
you change the port to 9000 it will be `http://localhost:9000`. You should be able to
|
||||
lookup this url with your browser.
|
||||
the backend. For the development environment this is `http://localhost:8000`, but if
|
||||
you change the port to 9000 it will be `http://localhost:9000`. You should be able to
|
||||
lookup this url with your browser.
|
||||
* `PRIVATE_BACKEND_URL` (default `http://backend:8000`): Not only the browser, but also
|
||||
the web-frontend server should be able to make HTTP requests to the backend. It might
|
||||
not have access to the `PUBLIC_BACKEND_URL` or there could be a more direct route,
|
||||
|
|
|
@ -93,6 +93,10 @@ export default function CoreModule(options) {
|
|||
key: 'FEATURE_FLAGS',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
key: 'BASEROW_DISABLE_GOOGLE_DOCS_FILE_PREVIEW',
|
||||
default: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
])
|
||||
|
|
|
@ -125,6 +125,10 @@ export class GoogleDocFilePreview extends FilePreviewType {
|
|||
}
|
||||
|
||||
isCompatible(mimeType, fileName) {
|
||||
if (this.app.$env.BASEROW_DISABLE_GOOGLE_DOCS_FILE_PREVIEW) {
|
||||
return false
|
||||
}
|
||||
|
||||
const conds = [
|
||||
'application/pdf',
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue