mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-14 16:36:21 +00:00
Improved help message for URL upload
* Hide notice about max size if it's equal to max size of regular uploads. * Show notice about DuckDuckGo's proxy if it's turned on. * Also updated description in config.sample.js to further emphasize about the limitation of using DuckDuckGo's proxy.
This commit is contained in:
parent
a36062d33c
commit
d4b6933891
@ -120,7 +120,8 @@ module.exports = {
|
|||||||
/*
|
/*
|
||||||
Use DuckDuckGo's proxy when fetching any URL uploads.
|
Use DuckDuckGo's proxy when fetching any URL uploads.
|
||||||
This may be considered a hack and not supported by DuckDuckGo, so USE AT YOUR OWN RISK.
|
This may be considered a hack and not supported by DuckDuckGo, so USE AT YOUR OWN RISK.
|
||||||
This have only been tested with pictures, GIFs, WEBMs and MP4s.
|
This should work with any type of URLs, but they have to be direct links,
|
||||||
|
since DuckDuckGo's proxy will not follow redirects.
|
||||||
*/
|
*/
|
||||||
urlDuckDuckGoProxy: false,
|
urlDuckDuckGoProxy: false,
|
||||||
|
|
||||||
|
@ -68,8 +68,10 @@ for (const page of config.pages) {
|
|||||||
}))
|
}))
|
||||||
} else if (page === 'home') {
|
} else if (page === 'home') {
|
||||||
safe.get('/', (req, res, next) => res.render('home', {
|
safe.get('/', (req, res, next) => res.render('home', {
|
||||||
|
maxSize: config.uploads.maxSize,
|
||||||
urlMaxSize: config.uploads.urlMaxSize,
|
urlMaxSize: config.uploads.urlMaxSize,
|
||||||
gitHash: safe.get('git-hash')
|
gitHash: safe.get('git-hash'),
|
||||||
|
urlDuckDuckGoProxy: config.uploads.urlDuckDuckGoProxy
|
||||||
}))
|
}))
|
||||||
} else if (page === 'faq') {
|
} else if (page === 'faq') {
|
||||||
const fileLength = config.uploads.fileLength
|
const fileLength = config.uploads.fileLength
|
||||||
|
@ -71,7 +71,15 @@
|
|||||||
<div class="control">
|
<div class="control">
|
||||||
<textarea id="urls" class="textarea" rows="2"></textarea>
|
<textarea id="urls" class="textarea" rows="2"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<p class="help">Maximum file size for URL upload is {{ urlMaxSize }}.</p>
|
<p class="help">
|
||||||
|
{% if urlMaxSize !== maxSize -%}
|
||||||
|
Maximum file size for URL upload is <span style="font-weight: bold">{{ urlMaxSize }}</span>.
|
||||||
|
{%- endif %}
|
||||||
|
{%- if urlMaxSize and urlMaxSize !== maxSize and urlDuckDuckGoProxy %}<br>{% endif -%}
|
||||||
|
{%- if urlDuckDuckGoProxy %}
|
||||||
|
Since we're using DuckDuckGo's proxy, the URLs have to be direct links.
|
||||||
|
{% endif -%}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
|
Loading…
Reference in New Issue
Block a user