1.0.0 • Published 6 months ago
b2-uploader v1.0.0
B2 Uploader CLI
A powerful command-line tool for managing file uploads to Backblaze B2 cloud storage. Features concurrent uploads, URL downloading, compression, encryption, and more.
Features
- � Upload local files or directly from URLs
- 📦 Batch upload with concurrent processing- � Optional file encryption
- 📥 Compression support
- 📂 Virtual folder mnaagement
## Usage Examples
### Basic Operations
```bash
# Upload a single file
b2-uploader upload file.jpg
# Upload from URL (use quotes for URLs with parameters)
b2-uploader upload "https://example.com/image.jpg?size=large&type=photo"
# List files in bucket
b2-uploader list
# Delete a file
b2-uploader delete filename.jpg
Advanced Features
# Upload entire directory with 5 concurrent uploads
b2-uploader upload-batch-concurrent ./photos -n 5
# Upload with compression
b2-uploader upload-batch-concurrent ./docs -c
# Upload with encryption
b2-uploader upload-batch-concurrent ./secure -e -p "your-password"
# Filter specific file types
b2-uploader upload-batch-concurrent ./media -f "\.mp4$"
# Create virtual folder
b2-uploader create-folder photos/2023
# Search files
b2-uploader search "vacation-2023"
# Get bucket statistics
b2-uploader stats
Configuration
Your B2 credentials are stored in ~/.b2uploaderconfig.json
. Required fields:
{
"applicationKeyId": "your-key-id",
"applicationKey": "your-application-key",
"bucketId": "your-bucket-id",
"bucketName": "your-bucket-name",
"bucketDomain": "f002.backblazeb2.com"
}
Features in Detail
Concurrent Uploads
- Upload multiple files simultaneously
- Progress bars for each upload
- Automatic retry on failure
- Configurable concurrency limit
File Processing
- Automatic MIME type detection
- Optional file compression
- AES-256 encryption support
- File name sanitization
Management
- List files with sizes and dates
- Search with regex support
- Delete files
- Create virtual folders
- Generate short URLs
Common Issues
URL with Special Characters
# Incorrect b2-uploader upload https://example.com/file?param=value&other=123 # Correct b2-uploader upload "https://example.com/file?param=value&other=123"
Large Files
- Maximum file size: 100MB
- For larger files, files are automatically split into chunks
License
MIT License - feel free to use this in your projects!
1.0.0
6 months ago