diff --git a/pixelapi/list.go b/pixelapi/list.go index 25bdd0c..4f2af11 100644 --- a/pixelapi/list.go +++ b/pixelapi/list.go @@ -25,6 +25,7 @@ type ListFile struct { Description string `json:"description"` DateCreated time.Time `json:"date_created"` DateLastView time.Time `json:"date_last_view"` + Views int64 `json:"views"` } // GetList get a List from the pixeldrain API. Errors will be available through diff --git a/res/template/apidoc.html b/res/template/apidoc.html index cef14a0..3af24ac 100644 --- a/res/template/apidoc.html +++ b/res/template/apidoc.html @@ -72,16 +72,16 @@ {{template "api-file-id-get"}} {{template "api-file-id-info-get"}} {{template "api-file-id-thumbnail-get"}} - {{template "api-file-id-delete"}} + {{/*template "api-file-id-delete"*/}}

List Methods

{{template "api-list-post"}} {{template "api-list-get"}} -

Filesystem Methods

- {{template "api-filesystem-path-post"}} - {{template "api-filesystem-path-get"}} - {{template "api-filesystem-path-delete"}} + + {{/*template "api-filesystem-path-post"*/}} + {{/*template "api-filesystem-path-get"*/}} + {{/*template "api-filesystem-path-delete"*/}} {{template "footer"}} diff --git a/res/template/fragments/api/list.html b/res/template/fragments/api/list.html index 924f81c..0bef4bb 100644 --- a/res/template/fragments/api/list.html +++ b/res/template/fragments/api/list.html @@ -128,7 +128,8 @@ "name": "01 Holy Wars... The Punishment Due.mp3", "description": "", "date_created": 1513033304, - "date_last_view": 1513033304 + "date_last_view": 1513033304, + "views": 1 }, { "detail_href": "/file/RKwgZb/info", @@ -136,7 +137,8 @@ "name": "02 Hangar 18.mp3", "description": "", "date_created": 1513033304, - "date_last_view": 1513033304 + "date_last_view": 1513033304, + "views": 2 }, { "detail_href": "/file/DRaL_e/info", @@ -144,7 +146,8 @@ "name": "03 Take No Prisoners.mp3", "description": "", "date_created": 1513033304, - "date_last_view": 1513033304 + "date_last_view": 1513033304, + "views": 3 } ] } diff --git a/res/template/home.html b/res/template/home.html index 7c1f98d..1358ae8 100644 --- a/res/template/home.html +++ b/res/template/home.html @@ -16,6 +16,8 @@
+ By uploading files to Pixeldrain you accept that a cookie will + be placed in your web browser. More information below.
@@ -23,29 +25,92 @@ -

Pixeldrain Public Beta

+

What is Pixeldrain?

- Note that this is an experimental version of Pixeldrain server, - the Pixeldrain backend has been completely redesigned from the - ground up to be more extensible, efficient and scalable. The - server this web application runs on is considered a testing - environment. Database resets can happen when architectural - changes need to be applied. + Pixeldrain is a file sharing website built for speed and ease of + use. +

+ +

Questions and Answers

+ +

For how long will my files be stored?

+

+ Files will be removed if they have not been viewed for 90 days. + A view is counted when someone visits the file's download page + (pixeldrain.com/u/somefile) or views the file through a list the + file is included in (pixeldrain.com/l/somelist).

- The Sia integration is still very experimental and could - fail, resulting in data loss. Do not upload files to this server - that you cannot afford to lose. Use the stable main server instead: - https://pixeldrain.com. + You cannot delete files yourself. Once a file has been uploaded + to pixeldrain it will stay there for at least 90 days. If you + accidentally upload something you shouldn't have, just don't + share the link. The file will expire eventually. File links are + not indexed or published anywhere. As long as you don't share it + nobody will see it. +

+ +

What cookies does pixeldrain use?

+

+ When uploading a file pixeldrain will install a cookie named + 'pduploads'. This cookie keeps a dot-separated list of all files + you have uploaded anonymously in this browser. This cookie is + only used for viewing your upload history.

- But don't let all that stop you from trying the new Pixeldrain! - The upload restrictions that the main site has haven't been - implemented in this version yet, so you can upload as much as - you want. The server only has 256 GiB of space available, if it - starts running out of space files will be purged from the local - filesystem and served from Sia on the next request. + When logging in to a pixeldrain account a cookie named + 'pd_auth_key' will be installed. This cookie keeps your login + session active. When you delete it you will be logged out of + your account.

+

+ When you use the style selector at the bottom of this page a + cookie called 'style' will be set. This cookie controls the + appearance of the website for you. +

+ +

Do I need to register an account?

+

+ Not if you don't want to. You're free to use pixeldrain + completely anonymously. Without a pixeldrain account you can + upload files, download files and create lists of files. And view + your uploaded files on the history page. + This page only shows files which were uploaded anonymously in + this web browser. +

+

+ By registering an account on pixeldrain you will be able to + access your files from any device with a web browser. Files you + upload and lists you create will be linked to your pixeldrain + account and will show up on your personal home + page. +

+ +

Does pixeldrain cost any money?

+

+ No, pixeldrain is completely free at the moment. While there is + an advertisement on the file downloading page, it doesn't + generate nearly enough revenue to pay for maintaining this + service. That's why I'd really appreciate it if you could spare + some coins. Possible methods for donating are: +

+

Legality

@@ -64,59 +129,6 @@ For other questions you can reach me at support@pixeldrain.com

-

Funding

-

- I'm currently paying for the Sia storage myself, since the site - doesn't have a revenue model yet. I'd appreciate it if you could - send some Siacoins my way: - 26117c19ca3975b315d663dcbbc19cf9c07274f441689d4392ed380b2337589ef1aacfbdc93f. - This address goes directly to the wallet on this server which is - used for uploading files to Sia :). I promise you it will be put - to good use! -

-

Features

-

- Here's a list of features this version of Pixeldrain has. -

-

New

- -

Completed

- -

Upcoming

- -

Missing

-

- Features which are in - https://pixeldrain.com, but - not in https://sia.pixeldrain.com. - These will be added soon enough. -

-

Style selector