Skip to content

feat: Add download command with progress tracking and encryption check #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pranavkonde
Copy link

Download Command Implementation

Description

  • Implemented new download command for Lighthouse storage
  • Added progress bar for download tracking
  • Added file encryption detection
  • Added detailed logging for debugging
  • Added support for custom output directory
  • Added file size verification
  • Added proper error handling and user feedback
  • Added support for concurrent downloads (structure in place)
  • Added proper MIME type handling
  • Added file integrity checks

Usage Examples

Basic Download

lighthouse-web3 download <cid>

image

Download with Custom Output Directory

lighthouse-web3 download <cid> --output ./downloads

image

Download with Concurrent Downloads

lighthouse-web3 download <cid> --concurrent 5

image

Download Encrypted File

lighthouse-web3 download <cid> --encrypted

image

image

Features

  • Progress bar shows download status
  • Automatic file type detection
  • File size verification
  • Detailed error messages
  • Support for encrypted files
  • Custom output directory support
  • Concurrent download support

Testing

The command has been tested with various file types including:

  • CSV files
  • Images
  • Text files
  • Encrypted files

Notes

  • For encrypted files, it's recommended to use the decrypt-file command instead
  • The command automatically detects if a file is encrypted and provides appropriate guidance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant