A command-line tool for uploading files to FileBrowser server with resumable upload support using the TUS protocol.
- Pure Go implementation with no third-party dependencies
- Built-in libraries only - uses only Go standard library
- Resumable uploads using TUS (Tus Resumable Upload Protocol)
- Chunked upload with configurable chunk size
- File comparison to avoid unnecessary uploads
- Progress tracking with real-time progress display
- Automatic sharing with configurable expiration
- Checksum verification for upload integrity
- Interactive mode for handling existing files
- Silent override mode for automation
- HTTPS/HTTP support
Download the latest binary for your platform from the releases page:
- Linux AMD64:
fb-uploader-linux-amd64 - Linux ARM64:
fb-uploader-linux-arm64 - macOS AMD64:
fb-uploader-darwin-amd64 - macOS ARM64:
fb-uploader-darwin-arm64 - Windows AMD64:
fb-uploader-windows-amd64.exe
# Example for Linux AMD64
wget https://github.com/ferstar/fb-uploader/releases/latest/download/fb-uploader-linux-amd64
chmod +x fb-uploader-linux-amd64
mv fb-uploader-linux-amd64 fb-uploadergit clone https://github.com/ferstar/fb-uploader.git
cd fb-uploader
make build./fb-uploader -host example.com -username myuser -password mypass file.txtexport FM_HOST=example.com
export FM_USERNAME=myuser
export FM_PASSWORD=mypass
./fb-uploader file.txt -host string
filebrowser server host (required: use -host flag or FM_HOST env)
-username string
filebrowser server username (required: use -username flag or FM_USERNAME env)
-password string
filebrowser server password (required: use -password flag or FM_PASSWORD env)
-chunk-size int
chunk size in bytes (default: 10MB) (default 10485760)
-upload-checksum
whether to supply the Upload-Checksum header
-print-progress
whether to print upload progress (default true)
-silent-override
whether to override existing file without asking
-use-https
whether to use HTTPS connection (default true)
The following parameters are required and must be provided either via command line flags or environment variables:
-
Host: FileBrowser server hostname
- Flag:
-host - Environment:
FM_HOST
- Flag:
-
Username: FileBrowser username
- Flag:
-username - Environment:
FM_USERNAME
- Flag:
-
Password: FileBrowser password
- Flag:
-password - Environment:
FM_PASSWORD
- Flag:
- Chunk Size: Upload chunk size in bytes (default: 10MB)
- Upload Checksum: Enable SHA1 checksum verification
- Print Progress: Show upload progress (default: true)
- Silent Override: Automatically override existing files
- Use HTTPS: Use HTTPS connection (default: true)
./fb-uploader -host example.com -username myuser -password mypass largefile.zip./fb-uploader -host example.com -username myuser -password mypass -silent-override largefile.zip./fb-uploader -host example.com -username myuser -password mypass -upload-checksum file.txt./fb-uploader -host example.com -username myuser -password mypass -chunk-size 5242880 file.txtWhen a file already exists on the server, the tool offers several options:
- Compare files: Compare local and server files using SHA256 hash
- Resume upload: Continue from where the upload was interrupted
- Overwrite: Replace the existing file
- Skip: Skip upload and get share link for existing file
After successful upload, the tool automatically creates a share link with:
- Default expiration: 8 hours
- Direct download: Preserves original filename
- Public access: No authentication required for download
The tool handles various error scenarios:
- Network interruptions: Automatic resume from last uploaded chunk
- Authentication failures: Clear error messages
- File not found: Validation before upload
- Server errors: Detailed error reporting
go test -vgo build -o fb-uploader main.gomain.go: Main application logicConfig: Configuration structureFileBrowserClient: HTTP client for FileBrowser APIUploader: TUS upload implementation
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
For issues and questions, please open an issue on the GitHub repository.