protected ExportFormatter $exportFormatter,
) {
$this->middleware('can:content-export');
+ $this->middleware('throttle:exports');
}
/**
$page = $this->queries->findVisibleBySlugsOrFail($bookSlug, $pageSlug);
$zip = $builder->buildForPage($page);
- return $this->download()->streamedDirectly(fopen($zip, 'r'), $pageSlug . '.zip', filesize($zip));
+ return $this->download()->streamedFileDirectly($zip, $pageSlug . '.zip', filesize($zip), true);
}
}