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 0000000..cb9fa72 Binary files /dev/null and b/res/static/img/misc/ftp_login.webp differ diff --git a/res/static/style/layout.css b/res/static/style/layout.css index 6f74137..849197a 100644 --- a/res/static/style/layout.css +++ b/res/static/style/layout.css @@ -115,6 +115,10 @@ header>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. +
+