Skip to content

Commit 976e05c

Browse files
committed
update README file
1 parent 32e2c1e commit 976e05c

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# PasteFile 📁 📥
2-
The service provides a convenient means of sharing files without the necessity for user accounts or a complicated setup. The accompanying code includes the server, encompassing everything you need to create your own instance.
2+
The service provides a convenient means of sharing files with easy setup. The code includes the server API and CLI client tool, encompassing everything you need to create your own instance.
33

44
![License](https://img.shields.io/github/license/robatipoor/pf)
55
[![Lines Of Code](https://tokei.rs/b1/github/robatipoor/pf?category=code)](https://github.com/robatipoor/pf)
@@ -13,7 +13,6 @@ The service provides a convenient means of sharing files without the necessity f
1313
**Feature highlights**
1414

1515
* Basic Authentication
16-
* Anonymous Uploads
1716
* File Expiration
1817
* Burn After Reading
1918
* Large File Support
@@ -56,6 +55,9 @@ $ docker run --name pf-api --rm -p 8080:8080 \
5655
**How to Use**
5756

5857
```sh
58+
# Open it in the default browser.
59+
$ open http://127.0.0.1:8080
60+
5961
# Ping the server.
6062
$ curl -X GET http://127.0.0.1:8080/healthz
6163

@@ -160,23 +162,23 @@ $ mv ~/.cargo/bin/cli ~/.cargo/bin/pf
160162
# Define an alias in the shell profile for 'pf' with server address
161163
$ alias pf="pf --server-addr http://localhost:8080"
162164

163-
# Upload a file and retrieve the corresponding download URL.
164-
$ pf upload --source-file ~/example-file.txt --progress-bar
165+
# Encrypt and upload a file and retrieve the corresponding download URL.
166+
$ pf upload --source-file ~/example-file.txt --key-nonce "{key}:{nonce}" --progress-bar
165167

166168
# Upload a file with basic authentication and progress bar option.
167169
$ pf --auth "username:password" upload --source-file ~/example-file.txt
168170

169-
# Upload a file with an expiration time of 10 minutes.
170-
$ pf upload --expire "10 minute" --source-file ~/example-file.txt
171+
# Upload a text with an expiration time of 10 minutes.
172+
$ echo 'Hello World!' | pf copy --expire "10 minute"
171173

172174
# Upload a file and then display the QR code.
173175
$ pf upload --source-file ~/example-file.txt --output qr-code
174176

175177
# Download a file with progress bar option.
176178
$ pf download --destination ~/example-dir/ --url-path "{code}/{file_name}" --progress-bar
177179

178-
# Download a file.
179-
$ pf download --destination ~/example-dir/ --url-path "{code}/{file_name}"
180+
# Paste a file.
181+
$ pf paste --url-path "{code}/{file_name}" > my_file.txt
180182

181183
# Get metadata for a file.
182184
$ pf info --url-path "{code}/{file_name}"

api/src/service/file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ pub async fn delete(
216216
}
217217

218218
pub fn read_file(config: &ApiConfig, file_path: &FilePath) -> ServeFile {
219-
ServeFile::new(get_fs_path(&config.fs.base_dir, &file_path))
219+
ServeFile::new(get_fs_path(&config.fs.base_dir, file_path))
220220
}
221221

222222
pub fn authorize_user(secret: Option<Secret>, secret_hash: &Option<SecretHash>) -> ApiResult<()> {

scripts/rm-test-dump.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
4+
rm -rf test-dump
5+
rm -rf api/test-dump
6+
rm -rf tmp/

0 commit comments

Comments
 (0)