mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-11 15:10:48 +02:00
Enable From External URL feature
This commit is contained in:
@@ -34,6 +34,7 @@ The present "extended" version of Overleaf CE includes:
|
||||
- Real-time track changes and comments
|
||||
- Autocomplete of reference keys
|
||||
- Symbol Palette
|
||||
- "From External URL" feature
|
||||
|
||||
## Enterprise
|
||||
|
||||
@@ -108,7 +109,7 @@ file during compilation. This is required for packages like `minted`. For this p
|
||||
```
|
||||
OVERLEAF_APP_NAME="Our Overleaf Instance"
|
||||
|
||||
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file
|
||||
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url
|
||||
|
||||
# Enables Thumbnail generation using ImageMagick
|
||||
ENABLE_CONVERSIONS=true
|
||||
@@ -158,6 +159,16 @@ TEX_COMPILER_EXTRA_FLAGS=-shell-escape
|
||||
```
|
||||
</details>
|
||||
|
||||
## "From External URL" feature
|
||||
|
||||
To enable the ["From External URL"](https://www.overleaf.com/learn/how-to/How_to_upload_a_file_using_an_external_URL) feature the variable
|
||||
`ENABLED_LINKED_FILE_TYPES` must include `url` type:
|
||||
```
|
||||
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url
|
||||
```
|
||||
This will extend both the *Add Files* menu and the *Insert Figure* dropdown in the toolbar: the *Add Files* menu allows you to add a
|
||||
file to your project using its URL, while the *Insert Figure* dropdown lets you insert an image into your document directly from its URL.
|
||||
|
||||
## Authentication Methods
|
||||
|
||||
The following authentication methods are supported: local authentication, LDAP authentication, SAML authentication,
|
||||
@@ -325,7 +336,7 @@ The above example results in loading into the contacts of the current LDAP user
|
||||
```
|
||||
OVERLEAF_APP_NAME="Our Overleaf Instance"
|
||||
|
||||
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file
|
||||
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url
|
||||
|
||||
# Enables Thumbnail generation using ImageMagick
|
||||
ENABLE_CONVERSIONS=true
|
||||
@@ -662,7 +673,7 @@ and set as appropriate in your IdP configuration, or send the metadata file to t
|
||||
```
|
||||
OVERLEAF_APP_NAME="Our Overleaf Instance"
|
||||
|
||||
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file
|
||||
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url
|
||||
|
||||
# Enables Thumbnail generation using ImageMagick
|
||||
ENABLE_CONVERSIONS=true
|
||||
@@ -818,7 +829,7 @@ The redirect URL for your OpenID Provider is `https://my-overleaf-instance.com/o
|
||||
```
|
||||
OVERLEAF_APP_NAME="Our Overleaf Instance"
|
||||
|
||||
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file
|
||||
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url
|
||||
|
||||
# Enables Thumbnail generation using ImageMagick
|
||||
ENABLE_CONVERSIONS=true
|
||||
|
||||
@@ -147,7 +147,7 @@ services:
|
||||
- dev.env
|
||||
environment:
|
||||
- APP_NAME=Overleaf Community Edition
|
||||
- ENABLED_LINKED_FILE_TYPES=project_file,project_output_file
|
||||
- ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url
|
||||
- EMAIL_CONFIRMATION_DISABLED=true
|
||||
- NODE_ENV=development
|
||||
- OVERLEAF_ALLOW_PUBLIC_ACCESS=true
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ services:
|
||||
OVERLEAF_REDIS_HOST: redis
|
||||
REDIS_HOST: redis
|
||||
|
||||
ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'
|
||||
ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file,url'
|
||||
|
||||
# Enables Thumbnail generation using ImageMagick
|
||||
ENABLE_CONVERSIONS: 'true'
|
||||
|
||||
@@ -20,7 +20,7 @@ services:
|
||||
OVERLEAF_EMAIL_SMTP_HOST: 'mailtrap'
|
||||
OVERLEAF_EMAIL_SMTP_PORT: '25'
|
||||
OVERLEAF_EMAIL_SMTP_IGNORE_TLS: 'true'
|
||||
ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'
|
||||
ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file,url'
|
||||
ENABLE_CONVERSIONS: 'true'
|
||||
EMAIL_CONFIRMATION_DISABLED: 'true'
|
||||
healthcheck:
|
||||
|
||||
@@ -32,14 +32,6 @@ module.exports = {
|
||||
getCanonicalURL,
|
||||
getSafeRedirectPath,
|
||||
getSafeAdminDomainRedirect,
|
||||
wrapUrlWithProxy(url) {
|
||||
// TODO: Consider what to do for Community and Enterprise edition?
|
||||
if (!Settings.apis.linkedUrlProxy.url) {
|
||||
throw new Error('no linked url proxy configured')
|
||||
}
|
||||
return `${Settings.apis.linkedUrlProxy.url}?url=${encodeURIComponent(url)}`
|
||||
},
|
||||
|
||||
prependHttpIfNeeded(url) {
|
||||
if (!url.match('://')) {
|
||||
url = `http://${url}`
|
||||
|
||||
@@ -72,7 +72,6 @@ function _getUrl(projectId, data, currentUserId) {
|
||||
if (!urlValidator.isWebUri(url)) {
|
||||
throw new InvalidUrlError(`invalid url: ${url}`)
|
||||
}
|
||||
url = UrlHelper.wrapUrlWithProxy(url)
|
||||
return url
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ const trackChangesModuleAvailable =
|
||||
/**
|
||||
* @typedef {Object} Settings
|
||||
* @property {Object | undefined} apis
|
||||
* @property {Object | undefined} apis.linkedUrlProxy
|
||||
* @property {string | undefined} apis.linkedUrlProxy.url
|
||||
* @property {Object | undefined} apis.references
|
||||
* @property {string | undefined} apis.references.url
|
||||
* @property {boolean | undefined} enableGithubSync
|
||||
@@ -85,8 +83,7 @@ const Features = {
|
||||
)
|
||||
case 'link-url':
|
||||
return Boolean(
|
||||
_.get(Settings, ['apis', 'linkedUrlProxy', 'url']) &&
|
||||
Settings.enabledLinkedFileTypes.includes('url')
|
||||
Settings.enabledLinkedFileTypes.includes('url')
|
||||
)
|
||||
case 'project-history-blobs':
|
||||
return Boolean(Settings.enableProjectHistoryBlobs)
|
||||
|
||||
Reference in New Issue
Block a user