Кто-нибудь еще сталкивался с этой проблемой при сохранении фрагментированных ответов и попытке получить Content-Length?
Код: Выделить всё
$options = array(
'http' => array(
'header' => "Authorization: Bearer $accessToken\r\n"
)
);
$context = stream_context_create($options);
// I'm trying to get the Content-Length to limit the file download to files larger than 1GB.
// $file_headers = get_headers($sourceFile, 1, $context);
// if($file_headers["Content-Type"])
$sourceFileStream = fopen($sourceFile, 'rb', false, $context);
Подробнее здесь: https://stackoverflow.com/questions/782 ... k-download
Мобильная версия