Down is a small, reliable Ruby library for downloading files that favors correctness, streaming, and clear error handling. It follows redirects safely, supports timeouts and retries, and streams responses to disk to keep memory usage low—ideal for large downloads or server environments. The API returns file-like objects (often Tempfile) with helpful metadata such as original filename and content type, which plays nicely with file-attachment libraries and background jobs. Multiple HTTP backends are supported, letting you choose between Net::HTTP or faster/feature-rich clients while keeping a consistent interface. It exposes distinct exception classes and content validation options, so callers can differentiate transient network issues from invalid responses. In practice, Down is often used as the dependable download layer in upload/processing pipelines where robustness matters more than raw feature bloat.

Features

  • Streaming download of remote files to disk or tempfiles, avoiding loading entire file into memory unnecessarily
  • Ability to specify maximum file size to protect against huge or malicious downloads (via content-length or early aborts)
  • Choice of HTTP backends: Net::HTTP (standard library), http.rb, HTTPX etc.
  • Ability to set destination path rather than always using a tempfile, override file extension, prefix names etc.
  • Metadata extraction: content type, original filename, charset etc from the HTTP response headers
  • Support for streaming open (reading while downloading) as well as complete file download, with options for timeouts etc.

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Down

Down Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Down!

Additional Project Details

Programming Language

Ruby

Related Categories

Ruby Libraries

Registered

2025-09-17