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