namespace App\Http\Controllers\Admin\Operations\FluidbookPublication;
use App\Models\FluidbookDocument;
+use Cubist\Backpack\Http\Controllers\Base\XSendFileController;
use Cubist\Util\Files\Files;
use Illuminate\Support\Facades\Route;
+use Illuminate\Support\Facades\Session;
trait CompositionOperation
{
protected function getThumb($doc_id, $doc_page)
{
+ Session::save();
/** @var FluidbookDocument $doc */
$doc = FluidbookDocument::find($doc_id);
$path = $doc->getFile($doc_page, 'jpg', 'thumb', true, true, '');
- return response(null)->header('Content-Type', Files::_getMimeType($path))->header('X-Sendfile', $path);
+ return XSendFileController::sendfile($path);
}
}