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