Fixed var type in an index template.
This commit is contained in:
parent
27ec17c9b8
commit
c90939eeac
@ -18,21 +18,21 @@ const (
|
|||||||
index__8 = `</div></section><section id="upload" class="center"><h2>Upload</h2><form action="/" method="POST" enctype="multipart/form-data"><input type="file" name="file"/><button type="submit">Upload</button></form></section><section><p class="center">You can use cURL to upload a file: <code>curl -F 'file=@somefile.ext' https://upload.arav.top</code></p><p class="center">Over I2P: <code>curl --proxy 127.0.0.1:4444 -F 'file=@somefile.ext' http://upload.arav.i2p</code></p><p class="center">A resulted link looks like this: <code>/f/base64rawURL(sha256)/filename.ext</code>.</p><p class="center">filename.ext is mandatory. It is a name the file will be retrieved with.</p></section><section><h2>Privacy statements</h2><p>I WILL cooperate with law enforcements and provide them with logs, guess I shouldn't clarify why. Abuses should be sent to <a href="mailto:admin@arav.top">admin@arav.top</a>.</p><p>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.</p><p>Each download also being logged and include: access time, IP-address, name of a file it was requested with, download name*, User-Agent.</p><p>*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.</p></section><footer>2022 Arav <<a href="mailto:me@arav.top">me@arav.top</a>></footer>`
|
index__8 = `</div></section><section id="upload" class="center"><h2>Upload</h2><form action="/" method="POST" enctype="multipart/form-data"><input type="file" name="file"/><button type="submit">Upload</button></form></section><section><p class="center">You can use cURL to upload a file: <code>curl -F 'file=@somefile.ext' https://upload.arav.top</code></p><p class="center">Over I2P: <code>curl --proxy 127.0.0.1:4444 -F 'file=@somefile.ext' http://upload.arav.i2p</code></p><p class="center">A resulted link looks like this: <code>/f/base64rawURL(sha256)/filename.ext</code>.</p><p class="center">filename.ext is mandatory. It is a name the file will be retrieved with.</p></section><section><h2>Privacy statements</h2><p>I WILL cooperate with law enforcements and provide them with logs, guess I shouldn't clarify why. Abuses should be sent to <a href="mailto:admin@arav.top">admin@arav.top</a>.</p><p>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.</p><p>Each download also being logged and include: access time, IP-address, name of a file it was requested with, download name*, User-Agent.</p><p>*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.</p></section><footer>2022 Arav <<a href="mailto:me@arav.top">me@arav.top</a>></footer>`
|
||||||
)
|
)
|
||||||
|
|
||||||
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 := &WriterAsBuffer{wr}
|
||||||
|
|
||||||
buffer.WriteString(index__0)
|
buffer.WriteString(index__0)
|
||||||
WriteEscString(mainSite, buffer)
|
WriteEscString(mainSite, buffer)
|
||||||
buffer.WriteString(index__1)
|
buffer.WriteString(index__1)
|
||||||
WriteInt(int64(fileMaxSize), buffer)
|
WriteEscString(fileMaxSize, buffer)
|
||||||
buffer.WriteString(index__2)
|
buffer.WriteString(index__2)
|
||||||
WriteInt(int64(keepForHours), buffer)
|
WriteInt(int64(keepForHours), buffer)
|
||||||
buffer.WriteString(index__3)
|
buffer.WriteString(index__3)
|
||||||
WriteEscString(storageUsedStr, buffer)
|
WriteEscString(storageUsedStr, buffer)
|
||||||
buffer.WriteString(index__4)
|
buffer.WriteString(index__4)
|
||||||
WriteInt(int64(storageUsed), buffer)
|
WriteInt(storageUsed, buffer)
|
||||||
buffer.WriteString(index__5)
|
buffer.WriteString(index__5)
|
||||||
WriteInt(int64(storageCapacity), buffer)
|
WriteInt(storageCapacity, buffer)
|
||||||
buffer.WriteString(index__6)
|
buffer.WriteString(index__6)
|
||||||
WriteEscString(storageCapacityStr, buffer)
|
WriteEscString(storageCapacityStr, buffer)
|
||||||
buffer.WriteString(index__7)
|
buffer.WriteString(index__7)
|
||||||
|
@ -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/top.jade
|
||||||
include base/body.header.jade
|
include base/body.header.jade
|
||||||
|
Loading…
Reference in New Issue
Block a user