diff --git a/web/index.jade.go b/web/index.jade.go index f50aced..04bebb8 100644 --- a/web/index.jade.go +++ b/web/index.jade.go @@ -18,21 +18,21 @@ const ( index__8 = `

Upload

You can use cURL to upload a file: curl -F 'file=@somefile.ext' https://upload.arav.top

Over I2P: curl --proxy 127.0.0.1:4444 -F 'file=@somefile.ext' http://upload.arav.i2p

A resulted link looks like this: /f/base64rawURL(sha256)/filename.ext.

filename.ext is mandatory. It is a name the file will be retrieved with.

Privacy statements

I WILL cooperate with law enforcements and provide them with logs, guess I shouldn't clarify why. Abuses should be sent to admin@arav.top.

Upload logs include: access time, IP-address, name of a file it was uploaded with, a SHA-256 hash of the file, download name*, size of the file in bytes, User-Agent.

Each download also being logged and include: access time, IP-address, name of a file it was requested with, download name*, User-Agent.

*Download name is a salted SHA-256 hash of the file encoded using base64 raw URL encoding. The hash is being salted to make useless any attempt of bruteforcing.

` ) -func Index(mainSite string, fileMaxSize, storageCapacity, storageUsed, keepForHours int, storageUsedStr, storageCapacityStr, storageAvailableStr string, wr io.Writer) { +func Index(mainSite string, storageCapacity, storageUsed int64, keepForHours int, fileMaxSize, storageUsedStr, storageCapacityStr, storageAvailableStr string, wr io.Writer) { buffer := &WriterAsBuffer{wr} buffer.WriteString(index__0) WriteEscString(mainSite, buffer) buffer.WriteString(index__1) - WriteInt(int64(fileMaxSize), buffer) + WriteEscString(fileMaxSize, buffer) buffer.WriteString(index__2) WriteInt(int64(keepForHours), buffer) buffer.WriteString(index__3) WriteEscString(storageUsedStr, buffer) buffer.WriteString(index__4) - WriteInt(int64(storageUsed), buffer) + WriteInt(storageUsed, buffer) buffer.WriteString(index__5) - WriteInt(int64(storageCapacity), buffer) + WriteInt(storageCapacity, buffer) buffer.WriteString(index__6) WriteEscString(storageCapacityStr, buffer) buffer.WriteString(index__7) diff --git a/web/templates/index.jade b/web/templates/index.jade index c27e8dc..7e7988a 100644 --- a/web/templates/index.jade +++ b/web/templates/index.jade @@ -1,4 +1,4 @@ -:go:func Index(mainSite string, fileMaxSize, storageCapacity, storageUsed, keepForHours int, storageUsedStr, storageCapacityStr, storageAvailableStr string) +:go:func Index(mainSite string, storageCapacity, storageUsed int64, keepForHours int, fileMaxSize, storageUsedStr, storageCapacityStr, storageAvailableStr string) include base/top.jade include base/body.header.jade