From 76febde36b05efeb8e9ad0bb64ad501962c07ff7 Mon Sep 17 00:00:00 2001
From: Wim Brand
Date: Wed, 15 Aug 2018 09:37:01 +0200
Subject: [PATCH 1/4] remove data loss warning. add support e-mail address
---
res/template/home.html | 40 ++++++----------------------------------
1 file changed, 6 insertions(+), 34 deletions(-)
diff --git a/res/template/home.html b/res/template/home.html
index 6957b8f..892d460 100644
--- a/res/template/home.html
+++ b/res/template/home.html
@@ -47,38 +47,6 @@
filesystem and served from Sia on the next request.
- News
- Data loss has occurred
-
- As noted at the start of this page, the integration with Sia
- cloud storage is highly experimental, everyone who uses this
- service should be aware of that fact.
-
-
- I recently discovered that the Sia node that is storing the
- files for this website had crashed because of a memory leak. The
- Sia team is currently trying to figure out how this memory leak
- occurred. It's likely the contract renewal went wrong which
- caused the Sia node to become unstable. Now when I start the Sia
- daemon it eats up about 1 GB of RAM per minute, so I've turned
- it off for the time being.
-
-
- In the short period that the Sia daemon keeps running I managed
- to request a file listing. It seems that because of the failed
- contracts about 80% of the stored files have dropped far below
- 1x redundancy, meaning that they are lost. The upside of all
- this is that the bug has been discovered before version 1.3.3
- has come out so it might be fixed in the next release, bringing
- the Sia platform as a whole another step closer to being a
- reliable data storage solution.
-
-
- Anyway, don't be surprised if your previously uploaded files are
- gone now. I will soon start purging all unrecoverable files from
- the database so we can start over with a clean slate.
-
-
Legality
I cannot be held liable for any illegal and / or copyrighted
@@ -92,6 +60,10 @@
and I'll take care of it.
Please share responsibly.
+
+ For other questions you can reach me at
+ support@pixeldrain.com
+
Funding
I'm currently paying for the Sia storage myself, since the site
@@ -128,7 +100,7 @@
Pasting files from the clipboard
Current viewer count on files/lists
File revisions (update a file without changing the URL)
- Proper file manager with directories (upcoming)
+ Proper file manager with directories (in progress)
Plenty more!
Missing
@@ -143,7 +115,7 @@
Some video formats (mime type detection is not complete)
Bandwidth Tracker
View counter
- Seasonal themes (thou shalt celebrate christmas!)
+ Seasonal themes
Style selector
From befe6644dabe880fa1689c868c494beeab932a77 Mon Sep 17 00:00:00 2001
From: Wim Brand
Date: Wed, 15 Aug 2018 07:55:39 +0000
Subject: [PATCH 2/4] replace old recaptcha key with new one
---
res/template/account/register.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/res/template/account/register.html b/res/template/account/register.html
index 6c5c74a..6843737 100644
--- a/res/template/account/register.html
+++ b/res/template/account/register.html
@@ -49,7 +49,7 @@
(Click the white box)
-
+
|
From 6e1e463ee9822af1d05a1b1102d6ffdcbea82b71 Mon Sep 17 00:00:00 2001
From: Wim Brand
Date: Wed, 15 Aug 2018 10:04:43 +0200
Subject: [PATCH 3/4] set log level at startup
---
init/init.go | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/init/init.go b/init/init.go
index 22391ef..06a05d0 100644
--- a/init/init.go
+++ b/init/init.go
@@ -27,5 +27,9 @@ func Init(r *httprouter.Router, prefix string) {
os.Exit(1)
}
+ if !webconf.DebugMode {
+ log.SetLogLevel(log.LevelInfo)
+ }
+
webcontroller.New(r, prefix, webconf)
}
From 6b46e1a0d8e8ad786562229c4c2f96c234fb4b48 Mon Sep 17 00:00:00 2001
From: Wim Brand
Date: Wed, 15 Aug 2018 10:11:31 +0200
Subject: [PATCH 4/4] set log level at startup
---
init/init.go | 4 ++--
main.go | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/init/init.go b/init/init.go
index 06a05d0..40c20e3 100644
--- a/init/init.go
+++ b/init/init.go
@@ -11,7 +11,7 @@ import (
)
// Init initializes the Pixeldrain Web UI controllers
-func Init(r *httprouter.Router, prefix string) {
+func Init(r *httprouter.Router, prefix string, setLogLevel bool) {
log.Info("Starting web UI server (PID %v)", os.Getpid())
var webconf = &conf.PixelWebConfig{}
@@ -27,7 +27,7 @@ func Init(r *httprouter.Router, prefix string) {
os.Exit(1)
}
- if !webconf.DebugMode {
+ if !webconf.DebugMode && setLogLevel {
log.SetLogLevel(log.LevelInfo)
}
diff --git a/main.go b/main.go
index 34c1191..d21dd97 100644
--- a/main.go
+++ b/main.go
@@ -15,7 +15,7 @@ import (
func main() {
r := httprouter.New()
- web.Init(r, "")
+ web.Init(r, "", true)
err := http.ListenAndServe(":8081", r)