Update hotlinking documentation

This commit is contained in:
2025-02-24 20:26:23 +01:00
parent 79be8f7e89
commit d602fc96c5
3 changed files with 64 additions and 131 deletions

View File

@@ -4,16 +4,27 @@
## For how long will my files be stored? ## For how long will my files be stored?
Files will be removed if they have not been viewed for 120 days. A view is Files will be removed if they have not been accessed for 120 days. When a file
counted when someone visits the file's download page (pixeldrain.com/u/somefile) is downloaded the expiry time is reset to 120 days from the current day. This
or views the file through a list the file is included in only happens when someone downloads more than 1% of the whole file in a single
(pixeldrain.com/l/somelist). request. So if you have a 5 GB file the timer is only extended when you download
at least 50 MB. The expiry timer is not updated when it was already updated
within the last 24 hours.
If you upload a file while logged into your pixeldrain account you will be able File expiry is often seen as a downside of pixeldrain. But keep in mind that 120
to delete the file yourself from the download page of the file. If you are not days is a very long time. Roughly four months. This means that you can keep a
logged in and you accidentally upload something you shouldn't have, just don't file active for an entire year by only downloading it three times. Files which
share the link. The file will expire eventually. File links are not indexed or are only very sporadically downloaded can stay online indefinitely. All this
published anywhere. As long as you don't share it nobody will see it. time the file is using storage space and processing power on our servers, which
costs real money.
If you would like to use pixeldrain for backups or long term storage, then the
free plan is _not the way to go_. It is only meant for publicly sharing files.
For real storage you should use the [pixeldrain filesystem](/filesystem).
If you are (ab)using pixeldrain for free storage, you should not be surprised
when the rules change at some point and all your stuff suddenly disappears. That
would never happen when using pixeldrain's filesystem.
## What cookies does pixeldrain use? ## What cookies does pixeldrain use?
@@ -25,9 +36,9 @@ When you use the style selector on the [Appearance](/appearance) page a cookie
called 'style' will be set. This cookie controls the appearance of the website called 'style' will be set. This cookie controls the appearance of the website
for you. for you.
When uploading a file pixeldrain will save a list of file links on your Pixeldrain does not use tracking cookies. We also don't use fingerprinting to
browser's local storage. This data is **only** used for viewing your upload track our users. The only information that is saved is the information that you
history on the [history page](/history). manually enter or upload.
## How does the transfer limit work? ## How does the transfer limit work?
@@ -63,6 +74,34 @@ transfer limit. If you want to limit how much of your transfer cap others can
use then you can configure a limit on the [sharing settings use then you can configure a limit on the [sharing settings
page](/user/sharing). page](/user/sharing).
If the person who downloads the file also has a premium account then their own
data cap will be used first.
## How does hotlinking work?
Hotlinking happens when someone downloads a file from pixeldrain without
visiting the pixeldrain website. This can be through embedding media files on
third party websites, or using download managers to download files directly.
Pixeldrain has a "hotlink protection mode". This activates when we detect that a
file is being hotlinked while neither the downloader nor the uploader of the
file has a premium subscription. When this happens a CAPTCHA test will appear on
the file's download page, and the file can only be downloaded once the CAPTCHA
is solved. When enough people complete the test the hotlink protection will be
removed and the file can be downloaded normally again.
There are two reasons why we implemented hotlink protection:
File hosting services are often used to spread malware and other nefarious data,
hotlink protection makes it significantly harder for people to abuse the service
in this way. This was the original motivation for implementing hotlink
protection, it has been very effective at preventing digital attacks.
Hotlinking also uses pixeldrain's bandwidth and processing power without letting
the user know that they are using pixeldrain. People who don't know that they
are using pixeldrain are less likely to purchase a premium plan. The download
page is our primary source of new customers, we need to make sure it is seen.
## Will premium improve my download speed? ## Will premium improve my download speed?
No, the download speed is limited by the stability of the connection between No, the download speed is limited by the stability of the connection between

View File

@@ -21,13 +21,10 @@ let file = {
Hotlink protection enabled Hotlink protection enabled
</h1> </h1>
<p> <p>
Hotlinking protection has been enabled for this file. This happens when Hotlinking protection has been enabled for this file. This happens
a file is downloaded many times outside of our file viewer page (this when a file is downloaded many times outside of our file viewer page
page). Usually this means people are using download managers like (this page). You can find more information about hotlink protection
JDownloader 2, Aria2 or wget. Using a download manager circumvents on the <a href="/about#toc_6">FAQ page</a>.
pixeldrain's advertisements and we lose money because of that. More
information about this protection mechanism can be found on <a
href="/#hotlinking">the home page</a>.
</p> </p>
{:else if file.availability === "ip_download_limited_captcha_required"} {:else if file.availability === "ip_download_limited_captcha_required"}
<h1> <h1>

View File

@@ -1,17 +1,6 @@
<script> <script>
import { onMount } from "svelte";
import Euro from "../util/Euro.svelte"; import Euro from "../util/Euro.svelte";
import Modal from "../util/Modal.svelte";
import OtherPlans from "./OtherPlans.svelte"; import OtherPlans from "./OtherPlans.svelte";
let file_expiry
let direct_linking
onMount(() => {
if (window.location.hash === "#direct_linking" || window.location.hash === "#hotlinking") {
direct_linking.toggle()
}
})
</script> </script>
<section> <section>
@@ -53,7 +42,10 @@ onMount(() => {
</div> </div>
<div class="left_col"> <div class="left_col">
Downloading <a class="round button" href="/about#toc_3">
<i class="icon">info</i>
Transfer limit
</a>
</div> </div>
<div class="feature_cell free_feat"> <div class="feature_cell free_feat">
<span class="bold">6 GB per day</span><br/> <span class="bold">6 GB per day</span><br/>
@@ -75,10 +67,10 @@ onMount(() => {
</div> </div>
<div class="left_col"> <div class="left_col">
<button class="round" on:click={direct_linking.toggle}> <a class="round button" href="/about#toc_6">
<i class="icon">info</i> <i class="icon">info</i>
Hotlinking Hotlinking
</button> </a>
</div> </div>
<div class="feature_cell free_feat"> <div class="feature_cell free_feat">
<span class="bold">Hotlinking not supported</span><br/> <span class="bold">Hotlinking not supported</span><br/>
@@ -102,10 +94,10 @@ onMount(() => {
</div> </div>
<div class="left_col"> <div class="left_col">
<button class="round" on:click={file_expiry.toggle}> <a class="round button" href="/about#toc_1">
<i class="icon">info</i> <i class="icon">info</i>
File expiry File expiry
</button> </a>
</div> </div>
<div class="feature_cell free_feat"> <div class="feature_cell free_feat">
<span class="bold">120 days</span> (4 months) <span class="bold">120 days</span> (4 months)
@@ -209,101 +201,6 @@ onMount(() => {
<OtherPlans/> <OtherPlans/>
</section> </section>
<Modal bind:this={file_expiry} title="File Expiry Postponing" padding>
<p>
Files on pixeldrain have to expire eventually. If we didn't do this the
website would keep growing forever and we would run out of money pretty
quickly.
</p>
<p>
Pixeldrain uses a postponing system for expiring files. When a file is
freshly uploaded it gets 120 days by default (240 days if you have the
pro plan). After these 120 days we will check when the file was last
viewed. Files which are regularly viewed could still bring new users to
the platform, it would be rude to show these people a File Not Found
page. So if the file was viewed in the last 120 days we will simply
postpone the next check a month. If the file was not viewed however, it
will be deleted.
</p>
<p>
Views are only counted when someone visits the download page in a web
browser. This makes sure that users can see that the file comes from
pixeldrain.
</p>
<p>
This way we can minimize dead links, and you won't have to tell your
friends to 'hurry and download this before it expires'.
</p>
</Modal>
<Modal bind:this={direct_linking} title="Hotlinking Bandwidth" padding>
<p>
Paying for bandwidth is the most expensive part of running pixeldrain.
Because of this we have to limit what can be downloaded and by who.
</p>
<p>
Normally when you view a file it's on pixeldrain's file viewer. The file
viewer is the page with the download button, the name of the file and a
frame where you can view the file if it's an image, video, audio, PDF or
text file.
</p>
<h3>Rate limiting</h3>
<p>
It's also possible to link directly to a file instead of the download
page. This circumvents our advertisers and branding and thus we lose
money when people do this. That's why I added 'hotlink protection mode'
to files. This mode is enabled when a file has been downloaded five
times more than it has been viewed through the file viewer. When hotlink
protection mode is activated a file cannot be downloaded through the
API, the request needs to come from the file viewer page. On the file
viewer you will see a CAPTCHA to fill in when you click the download
button.
</p>
<p>
More information about <a
href="https://en.wikipedia.org/wiki/Inline_linking" target="_blank"
rel="noreferrer">Hotlinking on Wikipedia</a>.
</p>
<h3>Hotlinking with a Pro subscription</h3>
<p>
When you have a Pro subscription you will get a monthly data transfer
limit for all the files on your account combined. Files you download
from pixeldrain are subtracted from the data cap. If you have <a
href="/user/subscription">hotlinking</a>
enabled your data cap is also used when other people download
your files.
</p>
<p>
In principle there is always someone who pays for the bandwidth usage
when a file is being downloaded:
</p>
<ol>
<li>
If the person downloading the file has a Pro subscription their data
cap is used.
</li>
<li>
If the person who uploaded the file has a Pro subscription and
hotlinking is enabled on their account, then the uploader's data cap
is used.
</li>
<li>
If neither the uploader nor the downloader has a Pro subscription
the download will be supported by advertisements on the download
page.
</li>
</ol>
<p>
The bandwidth cap on your account is a 30 day rolling window. This means
that bandwidth usage will expire 30 days after it was used. Your counter
will not reset at the start of the next month.
</p>
<p>
When a list of files is downloaded with the 'DL all files' button each
file in the resulting zip file will be counted separately.
</p>
</Modal>
<style> <style>
.bold { .bold {
font-weight: bold; font-weight: bold;
@@ -328,7 +225,7 @@ onMount(() => {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-align: center; text-align: center;
padding: 0.5em; padding: 0.25em;
min-height: 3em; min-height: 3em;
} }