/download-image

Downloads an image from the web and saves it to a temporary directory.

Primary LanguageRust

# Download Image

This Rust project downloads an image from the web and saves it to a temporary directory.

## Features

  • Downloads an image from a specified URL.
  • Saves the image to a temporary directory.
  • Handles errors using the `error-chain` crate.

  • ## Dependencies

    This project uses the following dependencies:

  • [`tokio`](https://crates.io/crates/tokio): For asynchronous runtime.
  • [`reqwest`](https://crates.io/crates/reqwest): For making HTTP requests.
  • [`error-chain`](https://crates.io/crates/error-chain): For error handling.
  • [`tempfile`](https://crates.io/crates/tempfile): For creating temporary files and directories.
  • [`dirs`](https://crates.io/crates/dirs): For accessing system directories.

  • ## Installation

    1. Ensure you have Rust installed.
    2. Clone this repository:
      git clone https://github.com/yourusername/download-image.git
    3. Navigate to the project directory:
      cd download-image
    4. Build the project:
      cargo build

    Usage

    Run the project with the following command:

    cargo run