unicode

2025-09-10 14:41:29 -05:00
parent 8c1d97d8c3
commit b94764f67e

@@ -1,6 +1,6 @@
# 📌 File Pinning # 📌 File Pinning
Pinning keeps specific **files** cached locally and protected from eviction. Its **per-file** metadata (stored in the mounts meta DB) and is supported on **S3, Sia, and Encrypt** providers. Pinning keeps specific **files** cached locally and protected from eviction. It's **per-file** metadata (stored in the mount's meta DB) and is supported on **S3, Sia, and Encrypt** providers.
> **Not supported on Remote Mount.** > **Not supported on Remote Mount.**
--- ---
@@ -22,7 +22,7 @@ Pinning keeps specific **files** cached locally and protected from eviction. It
- Pinned files are marked with `pinned=true` in the mounts metadata database. - Pinned files are marked with `pinned=true` in the mounts metadata database.
- Cache eviction **skips** pinned files. - Cache eviction **skips** pinned files.
- Pinning **does not auto-download** content in v2.0.x; the file is retained **after its cached** by normal access. - Pinning **does not auto-download** content in v2.0.x; the file is retained **after it's cached** by normal access.
- `v2.1.x` and above, by default, will auto-download files not residing in cache. - `v2.1.x` and above, by default, will auto-download files not residing in cache.
> To prefetch in v2.0.x, read the file once (e.g., `cat`, open/scan, copy). > To prefetch in v2.0.x, read the file once (e.g., `cat`, open/scan, copy).
@@ -91,12 +91,12 @@ Errors: `500` on provider/meta error.
### Pin file ### Pin file
**POST** `pin_file` (form: `api_path=/path/to/file.ext`) **POST** `pin_file` (form: `api_path=/path/to/file.ext`)
Responses: `200 OK` on success, `404 Not Found` if not a file or doesnt exist, `500` on error. Responses: `200 OK` on success, `404 Not Found` if not a file or doesn't exist, `500` on error.
### Unpin file ### Unpin file
**POST** `unpin_file` (form: `api_path=/path/to/file.ext`) **POST** `unpin_file` (form: `api_path=/path/to/file.ext`)
Responses: `200 OK` on success, `404 Not Found` if not a file or doesnt exist, `500` on error. Responses: `200 OK` on success, `404 Not Found` if not a file or doesn't exist, `500` on error.
> Success bodies are empty JSON; rely on the HTTP status code. > Success bodies are empty JSON; rely on the HTTP status code.
@@ -129,6 +129,6 @@ repertory -uf "/Docs/Quarterly Report.pdf"
## Troubleshooting ## Troubleshooting
- **Remote Mount:** Pinning is **unsupported**; CLI returns an HTTP error/unsupported operation. - **Remote Mount:** Pinning is **unsupported**; CLI returns an HTTP error/unsupported operation.
- **404 Not Found:** Wrong path, item isnt a file, or missing. Use `-gi` (item info) or `-gdi` (directory list) to verify paths. - **404 Not Found:** Wrong path, item isn't a file, or missing. Use `-gi` (item info) or `-gdi` (directory list) to verify paths.
- **401/403:** API auth enabled — pass `--user` and `--password` or set in config. - **401/403:** API auth enabled — pass `--user` and `--password` or set in config.
- **Pinned but not in local cache yet:** Pin prevents eviction; read once to cache locally for `v2.0.x`. For `v2.1.x+`, ensure configuration option `AutoDownloadOnPin` is set to `true`. - **Pinned but not in local cache yet:** Pin prevents eviction; read once to cache locally for `v2.0.x`. For `v2.1.x+`, ensure configuration option `AutoDownloadOnPin` is set to `true`.