Log in
Model

Download

Magento\Sales\Model\Download

What it does

The Download class handles secure file downloads for sales-related documents like custom option files attached to orders and quotes.

Developers use this class when they need to download files associated with customer orders, ensuring files are retrieved from either the filesystem or database storage and validating that requested files are within allowed directories.

It's primarily used in scenarios where customers need to download files they uploaded during checkout or associated with their order items.

Public Methods

  • downloadFile()
  • createResponse()