mirror of
https://github.com/hyzendust/command_upload.git
synced 2026-02-15 02:21:16 +01:00
Update: new URL freedoms4.org
This commit is contained in:
64
README.md
64
README.md
@@ -42,101 +42,91 @@ sudo mv upload.sh /usr/local/bin/upload
|
|||||||
|
|
||||||
### Basic upload:
|
### Basic upload:
|
||||||
|
|
||||||
upload -f path/to/file.png
|
upload -f path/to/file.png
|
||||||
|
|
||||||
### Upload with authentication:
|
### Upload with authentication:
|
||||||
|
|
||||||
upload -f file.png -u user:password
|
upload -f file.png -u user:password
|
||||||
|
|
||||||
### Upload and copy URL to clipboard:
|
### Upload and copy URL to clipboard:
|
||||||
|
|
||||||
upload -f file.png -c
|
upload -f file.png -c
|
||||||
|
|
||||||
### Specify a custom upload URL:
|
### Specify a custom upload URL:
|
||||||
|
|
||||||
upload -f file.png -U https://upload.example.com
|
upload -f file.png -U https://upload.example.com
|
||||||
|
|
||||||
### Add custom headers and form fields:
|
### Add custom headers and form fields:
|
||||||
|
|
||||||
upload -f file.png -H "X-API-Key: key" -F "extra=field"
|
upload -f file.png -H "X-API-Key: key" -F "extra=field"
|
||||||
|
|
||||||
### Take screenshot and upload:
|
### Take screenshot and upload:
|
||||||
|
|
||||||
upload -s/--screenshot\
|
upload -s/--screenshot\
|
||||||
for a full-screen screenshot, upload -s --full
|
for a full-screen screenshot, upload -s --full
|
||||||
|
|
||||||
### Pastebin:
|
### Pastebin:
|
||||||
cat log.txt | upload -p\
|
cat log.txt | upload -p\
|
||||||
echo "Hello World" | upload -p -c
|
echo "Hello World" | upload -p -c
|
||||||
|
|
||||||
### Delete uploaded file(s):
|
### Delete uploaded file(s):
|
||||||
|
|
||||||
upload -d file.png file2.pdf\
|
upload -d file.png file2.pdf\
|
||||||
upload -d https://example.com/file.png file2.pdf
|
upload -d https://example.com/file.png file2.pdf
|
||||||
|
|
||||||
## Viewing History:
|
## Viewing History:
|
||||||
|
|
||||||
### Recent Uploads (Outputs all uploads (oldest → newest) with timestamp, filename, and URL)
|
### Recent Uploads (Outputs all uploads (oldest → newest) with timestamp, filename, and URL)
|
||||||
|
|
||||||
upload -r
|
upload -r
|
||||||
|
|
||||||
### Check all uploads (active first, then expired):
|
### Check all uploads (active first, then expired):
|
||||||
|
|
||||||
upload -C
|
upload -C
|
||||||
|
|
||||||
### Check only active uploads:
|
### Check only active uploads:
|
||||||
|
|
||||||
upload -C -a
|
upload -C -a
|
||||||
|
|
||||||
### Check only expired uploads:
|
### Check only expired uploads:
|
||||||
|
|
||||||
upload -C -e
|
upload -C -e
|
||||||
|
|
||||||
### History is saved in this file (can be changed in script):
|
### History is saved in this file (can be changed in script):
|
||||||
|
|
||||||
~/.uploaded_files.txt
|
~/.uploaded_files.txt
|
||||||
|
|
||||||
Each line format:
|
--Each line format: YYYY-MM-DD HH:MM:SS | filename | URL
|
||||||
|
|
||||||
YYYY-MM-DD HH:MM:SS | filename | URL
|
--Tracks last 100 uploads.
|
||||||
|
|
||||||
Used for tracking last 100 uploads.
|
--recent flag outputs the contents of the file.
|
||||||
|
|
||||||
--recent shows chronological uploads.
|
--check flag checks all the URLs from the file and shows if they are still active.
|
||||||
|
|
||||||
--check verifies if URLs are still active.
|
|
||||||
|
|
||||||
## Colors
|
## Colors
|
||||||
|
|
||||||
Green: Successful uploads
|
Green: Successful uploads
|
||||||
|
|
||||||
Orange: URL copied to clipboard
|
Orange: URL copied to clipboard
|
||||||
|
|
||||||
Red: Expired uploads
|
Red: Expired uploads
|
||||||
|
|
||||||
### Disable color output:
|
### Disable color output:
|
||||||
|
|
||||||
upload -f file.png --no-color
|
upload -f file.png --no-color
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
Bash 4+
|
Bash 4+, curl
|
||||||
|
|
||||||
curl
|
For clipboard copying: xclip(Linux), pbcopy(MacOS)
|
||||||
|
|
||||||
Optional for clipboard copying:
|
For screenshot uploading: grim, slurp
|
||||||
|
|
||||||
Linux: xclip
|
|
||||||
|
|
||||||
macOS: pbcopy
|
|
||||||
|
|
||||||
Optional for Screenshot uploading:
|
|
||||||
|
|
||||||
grim, slurp
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT License - https://mit-license.org/
|
MIT License - https://mit-license.org/
|
||||||
|
|
||||||
### Author
|
### Author
|
||||||
Created by psychhim – https://github.com/hexZoN3/command_upload
|
Created by hyzen – https://github.com/hyzendust/command_upload
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
UPLOAD_URL="https://user:pass@upload.freedoms4.top/index.php"
|
UPLOAD_URL="https://user:pass@upload.freedoms4.org/index.php"
|
||||||
HISTORY_FILE="$HOME/.uploaded_files.txt"
|
HISTORY_FILE="$HOME/.uploaded_files.txt"
|
||||||
COPY_TO_CLIPBOARD=false
|
COPY_TO_CLIPBOARD=false
|
||||||
USE_COLOR=true
|
USE_COLOR=true
|
||||||
|
|||||||
Reference in New Issue
Block a user