← Back to Download Manager Support
Hi.
I'm using OctoberCms 3.4 is seems the
$metaData = $filesystem->getMetaData($path);
isn't available, and after commenting the line there's a problem downloading file
Unable to read file from location: protected/64b/549/192/64b549192ea47058402983.odt.
I've got it. Changed the lines ` /* @var \League\Flysystem\Filesystem $filesystem / $filesystem = Storage::disk('local')->getDriver();
$path = $file->getDiskPath();
$metaData = $filesystem->getMetaData($path); $stream = $filesystem->readStream($path);
if (ob_get_level()) {
ob_end_clean();
}
return response()->stream(function () use ($stream) {
fpassthru($stream);
}, 200, [
'Content-Type' => $metaData['type'],
'Content-disposition' => 'attachment; filename="' . $file->file_name . '"',
]);`
to return Response::download($file->getlocalPath(),$file->file_name);
Hi, we just released version 1.0.8 to solve this issue.
We've used a different approach than yours, trying to also fix the behavior of this plugin when using some remote filesystem to store uploads (no one seems to be doing that anyway, but it should be possible now).
Let us know if you encounter other issues with October 3.4
1-4 of 4