FileUpload\FileUpload::getNewHeaders PHP Méthode

getNewHeaders() protected méthode

Generate headers for response
protected getNewHeaders ( array $files, array $content_range ) : array
$files array
$content_range array
Résultat array
    protected function getNewHeaders(array $files, $content_range)
    {
        $headers = array('pragma' => 'no-cache', 'cache-control' => 'no-store, no-cache, must-revalidate', 'content-disposition' => 'inline; filename="files.json"', 'x-content-type-options' => 'nosniff');
        if ($content_range && is_object($files[0]) && $files[0]->size) {
            $headers['range'] = '0-' . ($this->fixIntegerOverflow($files[0]->size) - 1);
        }
        return $headers;
    }