From 141c7eab845886e1136939bc9bf49233f2592f72 Mon Sep 17 00:00:00 2001
From: Wim Brand
Date: Mon, 27 Sep 2021 23:20:35 +0200
Subject: [PATCH] Change direct link to hotlink
---
res/include/md/api_file.md | 8 ++---
res/template/home.html | 52 ++++++++++++--------------------
svelte/src/user_home/Home.svelte | 4 +--
3 files changed, 26 insertions(+), 38 deletions(-)
diff --git a/res/include/md/api_file.md b/res/include/md/api_file.md
index ee120d5..d69fdfc 100644
--- a/res/include/md/api_file.md
+++ b/res/include/md/api_file.md
@@ -7,7 +7,8 @@
### Description
Upload a file. I recommend that you use the PUT API instead of the POST API.
-It's easier to use.
+It's easier to use and the multipart encoding of the POST API can cause
+performance issues in certain environments.
### Parameters
@@ -163,9 +164,8 @@ limit will be enabled if a file has three times more downloads than views. The
owner of a file can always download it. When a file is rate limited the user
will need to fill out a captcha in order to continue downloading the file. The
captcha will only appear on the file viewer page (pixeldrain.com/u/{id}). Rate
-limiting has been added to prevent the spread of viruses and to stop direct
-linking. Direct linking is only allowed when files are uploaded using a Pro
-account.
+limiting has been added to prevent the spread of viruses and to stop hotlinking.
+Hotlinking is only allowed when files are uploaded using a Pro account.
Pixeldrain also includes a virus scanner. If a virus has been detected in a file
the user will also have to fill in a captcha to download it.
diff --git a/res/template/home.html b/res/template/home.html
index 83a70db..b836c1d 100644
--- a/res/template/home.html
+++ b/res/template/home.html
@@ -192,7 +192,9 @@
Rate limiting mode will be enabled when a file has 3
@@ -286,7 +288,7 @@
20 GB max file size (18.63 GiB)
120 days file expiry
-
2 TB direct link bandwidth
+
2 TB hotlink bandwidth
2 TB storage space
@@ -303,7 +305,7 @@
20 GB max file size
240 days file expiry
-
4 TB direct link bandwidth
+
4 TB hotlink bandwidth
4 TB storage space
@@ -320,7 +322,7 @@
20 GB max file size
480 days file expiry
-
8 TB direct link bandwidth
+
8 TB hotlink bandwidth
8 TB storage space
@@ -337,7 +339,7 @@
20 GB max file size
Files never expire
-
16 TB direct link bandwidth
+
16 TB hotlink bandwidth
16 TB storage space
@@ -354,7 +356,7 @@
20 GB max file size
Files never expire
-
32 TB direct link bandwidth
+
32 TB hotlink bandwidth
32 TB storage space
@@ -373,7 +375,7 @@
20 GB max file size
Files never expire
-
48 TB direct link bandwidth
+
48 TB hotlink bandwidth
48 TB storage space
@@ -392,7 +394,7 @@
20 GB max file size
Files never expire
-
64 TB direct link bandwidth
+
64 TB hotlink bandwidth
64 TB storage space
@@ -411,7 +413,7 @@
20 GB max file size
Files never expire
-
96 TB direct link bandwidth
+
96 TB hotlink bandwidth
96 TB storage space
@@ -430,30 +432,11 @@
20 GB max file size
Files never expire
-
128 TB direct link bandwidth
+
128 TB hotlink bandwidth
128 TB storage space
-
@@ -495,6 +478,11 @@
of the file and a frame where you can view the file if it's an
image, video, audio, PDF or text file.
+
+ More information about Hotlinking on Wikipedia.
+
Rate limiting
It's also possible to link directly to a file instead of the
@@ -507,7 +495,7 @@
from the file viewer page. On the file viewer you will see a
CAPTCHA to fill in when you click the download button.
- Direct downloading with a Pro subscription
+ Hotlinking with a Pro subscription
When you have a Pro subscription you will get a monthly
bandwidth cap for all the files on your account combined. Normal
@@ -549,14 +537,14 @@
}
function explainDirectLinking() {
let m = new Modal(
- document.body, null, "Direct Linking Bandwidth", "800px", "auto"
+ document.body, null, "Hotlinking Bandwidth", "800px", "auto"
)
m.cloneTemplate("tpl_direct_linking")
m.open()
return false
}
- if (window.location.hash === "#direct_linking") {
+ if (window.location.hash === "#direct_linking" || window.location.hash === "#hotlinking") {
explainDirectLinking()
}
diff --git a/svelte/src/user_home/Home.svelte b/svelte/src/user_home/Home.svelte
index d2ee7a1..189f4e8 100644
--- a/svelte/src/user_home/Home.svelte
+++ b/svelte/src/user_home/Home.svelte
@@ -155,11 +155,11 @@ onDestroy(() => {
- Direct link bandwidth:
+ Hotlink bandwidth:
{formatDataVolume(direct_link_bandwidth_used, 3)}
out of
{formatDataVolume(window.user.subscription.direct_linking_bandwidth, 3)}
- (More information about direct linking)
+ (More information about hotlinking)