From 6edb2e81d71d17d64783cebc2c01fc1d67812398 Mon Sep 17 00:00:00 2001 From: Fornax Date: Tue, 6 Feb 2024 17:14:40 +0100 Subject: [PATCH] Add filesystem documentation --- res/include/md/filesystem.md | 107 ++++++++++++++++++++++++ res/static/img/misc/ftp_login.webp | Bin 0 -> 6306 bytes res/static/style/layout.css | 4 + res/template/fragments/page_wrap.html | 25 +++--- svelte/src/filesystem/Filesystem.svelte | 5 ++ webcontroller/web_controller.go | 1 + 6 files changed, 131 insertions(+), 11 deletions(-) create mode 100644 res/include/md/filesystem.md create mode 100644 res/static/img/misc/ftp_login.webp diff --git a/res/include/md/filesystem.md b/res/include/md/filesystem.md new file mode 100644 index 0000000..21395c1 --- /dev/null +++ b/res/include/md/filesystem.md @@ -0,0 +1,107 @@ +# Filesystem + +Pixeldrain has an experimental filesystem feature. It can be accessed from any +account with a Prepaid plan or a Persistence or higher subscription by going to +[pixeldrain.com/d/me](/d/me). + + * **IMPORTANT**: The filesystem is *experimental*. This means that it's not + finished yet. While the filesystem seems stable now and I am using it + personally too, you are strongly advised to keep backups of anything you + upload there. + * If you experience any issues while using the filesystem, feel free to discuss + them on [the Discord community](https://discord.gg/TWKGvYAFvX). + +Contents: + + * [Pricing](#pricing) + * [Directory sharing](#directory-sharing) + * [Limits](#limits) + * [Client integrations](#client-integrations) + * [Rclone integration](#rclone-integration) + * [FTPS](#ftps) + +## Pricing + +Every time you create or remove a file your account's storage usage will be +updated. This can take some time. If your account's storage is full you will no +longer be able to upload anything to the filesystem. + +For Prepaid plans the storage is charged at €4 per TB per month. You can view +your usage in the [transaction log](/user/prepaid/transactions). + +**All bandwidth used from the filesystem is charged**, there are no free +downloads from the filesystem. This means that any time you or anyone else +downloads something from a directory owned by your account that bandwidth usage +will be counted and charged at a rate of €2 per TB. It also means that you will +not be able to access your files if your account reaches its bandwidth limit. +Your only options then are to upgrade or wait for your transfer cap to free up +again. + +## Directory sharing + +Files in the the filesystem are private by default. Only you can access them +from your own account. Files and directories can be shared by clicking the Share +button in the toolbar while inside the directory, or by clicking the pencil icon +next to the directory in the file viewer. + +Shared directories and files will have a shared icon next to them in the file +manager. Clicking that icon will open the shared link. You can also copy the +shared link directly with the `Copy link` button in the toolbar. + +If a shared file gets reported for breaking the [content policy](/abuse) your +ability to share files from your account may be taken away. + +## Limits + +Here is a quick overview of the filesystem's limits: + + * Max 10000 files per directory + * Max file size is 100 GB + * File/directory names can be up to 255 characters long + * Path names can be up to 4095 characters long + * You can have a maximum of 64 nested directories + * The filesystem does not support hard or symbolic links, this might change + later + +When traversing a path, pixeldrain requests one directory at a time from the +database. This means that filesystem operations will get slower the more nested +directories you have. Keep that in mind when organizing your files. + +## Client integrations + +There are two ways to access your filesystem from outside the web interface. + +### Rclone integration + +I have built a custom rclone backend to integrate with the filesystem. It can be +found [on my GitHub](https://github.com/Fornaxian/rclone). To use it you will +have to compile the project yourself. I will keep this fork in sync until the +changes are merged into the real rclone. I have a [pull +request](https://github.com/rclone/rclone/pull/7460) open with the master repo, +but it has not been accepted yet. + +### FTPS + +The filesystem also supports FTPS, both anonymously and with an account. The FTP +server is hosted at `pixeldrain.com` on port 990. The encryption mode used is +`Implicit FTP over TLS`. Here is an example configuration in FileZilla: + +![FTP configuration](/res/img/misc/ftp_login.webp) + +There are a two different ways to log in to the FTP server: + +#### Read-only shared directory + +To access a shared directory in read-only mode you need to enter the directory +ID as username in your FTP client. The directory ID can be found at the end of a +shared directory URL. Example: `https://pixeldrain.com/d/abcd1234`, in this case +`abcd1234` is the directory ID. The ID will always be 8 characters long and is +case-sensitive. The password must be left empty + +#### Read-write personal directory + +To connect to your personal directory you need to enter your account's username +as username in the FTP client. The password needs to be an API key from the [API +keys page](/user/api_keys). If you connect now you will be able to access your +personal directory (called `/me`). Here you can upload and download to your +heart's desire. diff --git a/res/static/img/misc/ftp_login.webp b/res/static/img/misc/ftp_login.webp new file mode 100644 index 0000000000000000000000000000000000000000..cb9fa72ba50179b5da5462150a1037098c2233e8 GIT binary patch literal 6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`P1UVd-sX04ArxG%mtu#NF>6+Hnhd#%+x+)=L#KT8d^1{xv zwh-j|F^sc%C@G}IfFpZcb$Vx_0KuaYn6`-!rNO>=AyfJ0$1vn6+gOSG=Hq4YzcIo& zDWy&3H&4mj$1lbeeG^BVukXsMPSwpsVyVW2ptc@kf?Og8t1}tpvv2{nDdlO^?gDN?XUZ z#QV29$q--8<7{PCMbQdcqgH2klB+j>El&;4s=w+(i-3E;_eY9ny&)Z3 zv{8q$>-E@e{AnNU5v4_(L`DqfBmIHEsiC}rZ)frwtl0gSEz;R2dWPJxS_Yv5&$K&M zmY18P0*7_$ExpPa0C0?>T?J`Pi2*>;n~j2Rv{Pw(+7>sT(@)91h|60^105&wnoX(@ zD~Y}hXc2}&?oSG1f4+H3&2USSOb!SRg7MQ%7CoL1H)x*-hvA*UlgixA*pv458EXeT zl~hE#bZo_KX4Ze3<|bWd(NyI~%CKeB0>Ud&%7p=wlv1qq-kjdJAkPPwUkp<~5+?}H z%t9jVdDEBR!?=HooV(7Z)S)!>z&o6$>4Kbg!vcfv-f5$Vt|l z;mlv)uK;;A%y!GS0z*?8pt2-Z}i%i{3Q9En2-&Y!=)SSci~##MD{@EpX4S8ZQECSAEDJK`=Ka=s`hMZilOzHDBL9cc)7FR!Zc!dE@uK11L?=7xg9R@qy-q(Tsc{&e-#&M%w)>7Kvca84dnld3NS1-tm>Q?@S^0$-gH@WFAm9B`9 WVYK!m?ahO*J4_YZ?}h1 { color: var(--background_text_color); } +p>img { + max-width: 100%; +} + /* Page layout elements */ .button_toggle_navigation { diff --git a/res/template/fragments/page_wrap.html b/res/template/fragments/page_wrap.html index b611e11..a34eec7 100644 --- a/res/template/fragments/page_wrap.html +++ b/res/template/fragments/page_wrap.html @@ -7,18 +7,21 @@ Subscriptions For creators
- {{if .Authenticated}}{{.User.Username}} - My Files - My Albums - {{if .User.IsAdmin}} - Filesystem - Admin Panel - {{end}} - Log out + {{if .Authenticated}} + {{.User.Username}} + My Files + My Albums + {{if .User.IsAdmin}} + Admin Panel + {{end}} + {{if .User.Subscription.FilesystemAccess}} + Filesystem + {{end}} + Log out {{else}} - Login - Register - Upload History + Login + Register + Upload History {{end}}
About diff --git a/svelte/src/filesystem/Filesystem.svelte b/svelte/src/filesystem/Filesystem.svelte index a824df4..31873a9 100644 --- a/svelte/src/filesystem/Filesystem.svelte +++ b/svelte/src/filesystem/Filesystem.svelte @@ -157,6 +157,11 @@ const loading_evt = e => { +
+ The filesystem is an experimental feature! Please read the guide before using it. +
+