Edited some pages and cleaned conf.py sample

This commit is contained in:
Dominik V. Salonen 2016-01-18 09:07:35 +01:00
parent a6648bf423
commit f0b07ac9c1
4 changed files with 20 additions and 9 deletions

View File

@ -1,17 +1,24 @@
# Create an empty config dict
config = dict()
##
#
# Main server configuration
#
##
config["HOST"] = "127.0.0.1"
# This string will be used in file URLs that are returned
config["DOMAIN"] = "example.com"
# This string will be used in file URLs that are returned, you will need to include http:// or https://
config["DOMAIN"] = "http://example.com"
config["PORT"] = 8282
# Disable this for production use
config["DEBUG"] = True
# Extended debug will add extra debug output that's not normally provided by flask
config["EXTENDED_DEBUG"] = False
# Single user authentication, leave blank to disable authentication
config["KEY"] = ""
@ -19,6 +26,7 @@ config["KEY"] = ""
config["UPLOAD_FOLDER"] = './data'
config["ALLOW_ALL_FILES"] = True
config["ALLOWED_EXTENSIONS"] = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'])
# If this is set to true, old files will be deleted. TIME is how far behind (in seconds) the last accessed time can be before files get deleted
config["DELETE_FILES"] = True
config["TIME"] = 30

View File

@ -50,7 +50,7 @@ body {
.links {
font-size: 0;
margin-top: 20px;
margin-top: 5px;
text-align: center;
list-style: none;
}

View File

@ -2,19 +2,22 @@
{% block body %}
<h1>
Temporary storage
Access-based storage
</h1>
<p>
{{ page.title }} is now a temporary storage service.
{{ page.title }} is a service that keeps files stored depending on their popularity.
</p>
<p>
I've shifted from permanent storage to temporary storage. The main reason being that about 93% of files uploaded to the old site were never accessed again after the first week.
File storage times are one week from when they were last accessed. Or one week since they were uploaded if they're never accessed.
</p>
<p>
Now hold your horses - We don't delete files one week after upload. We delete them one week after they were last accessed.
Meaning that if you upload a file on December 10th and someone accesses that file on the 13th, we won't delete the file until the 20th. If someone also fetched the file on the 17th, your file will stay until December 25th.
</p>
<p>
Meaning that if you upload a file on December 10th and someone accesses that file on the 13th. Then we won't delete the file until the 20th. If someone then visits the file on the 17th, the counter resets again and your file will stay until December 25th.
In a similar fashion; if you upload a file on December 3rd and send it to someone, then the file is never accessed again. It will be deleted on the 10th.
</p>
<p>
Even though I personally only do it to limit the server costs and keep the site running fast. Many users refer to this as a form of "Security Through Obscurity" since file URLs are whatever the user first uploaded and they will die at unpredictable times. Making it harder to brute-force file links
</p>
<h1>

View File

@ -3,7 +3,6 @@
<h1 class="title">
QuadFile
</h1>
<p class="note">This is temporary storage, check the about page for details</p>
<form action="" id="form" name="fileForm" method="post" enctype="multipart/form-data" class="uploadForm">
<div id="uploadButton" class="uploadButton">
<p id="uploadText">
@ -13,6 +12,7 @@
</div>
<input type="hidden" name="source" value="web">
</form>
<p class="note">This storage is not always permanent, check the about page for details</p>
<ul class="links">
<li>
<a href="/about">About</a>