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
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
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