1.2.6. M2_Content::streamBinary($binary, [$streamType])

This method is used when a binary (a field of type image or file) must be kept private and streamed directly from the database instead of being accessible from a direct URL.

The $binary parameter is the array returned by M2_Content::get() for the field that holds the binary.

The optional $streamType parameter can be "attachment" or "inline", depending on whether you want to force a download or let people view the file inline in their browser, if possible.

Important

To keep the files private it is your responsibility that this method is only called on login protected pages.