Closed
Description
Re-opening this because it's an issue for every application that use non-standard filetypes.
#41960 (comment)_
- Laravel Version: 9.8.1
- PHP Version: 8.1.3
- league/flysystem 3.0.16
Description:
$headers["Content-Type"] = "text/plain";
$headers["Content-Length"] = $file_size;
$headers["Accept-Ranges"] = "bytes";
$headers["Content-Disposition"] = "attachment; filename={$id}.left";
$headers["Content-Range"] = "bytes " . 0 . "-" . ($file_size) . "/" . $file_size;
Storage::disk("localdisk")->download($id.".found", $headers);
Results in the following error:
local.ERROR: Unable to retrieve the mime_type for file at location: 737.found. {"exception":"[object] (League\\Flysystem\\UnableToRetrieveMetadata(code: 0): Unable to retrieve the mime_type for file at location: 737.found. at /var/www/hostname/vendor/league/flysystem/src/UnableToRetrieveMetadata.php:49)
I believe this is caused by me having a non-standard extension, which is fine since I provided the content-type in the headers explicitly. But instead I'm getting errors now with my recent upgrade from laravel 8 to laravel 9. Any way to make this work?
Metadata
Assignees
Labels
No labels