fix audio

This commit is contained in:
Ben Goldsworthy 2023-07-20 23:07:28 +00:00
parent 70f398edaf
commit d5d0b426f1

View file

@ -23,6 +23,7 @@
} }
} elseif (preg_match("/\.ogg/", $filepath[1])) { } elseif (preg_match("/\.ogg/", $filepath[1])) {
$hasEmbed = 'audio'; $hasEmbed = 'audio';
$trip_slug = preg_replace( '/[^A-Za-z0-9-]+/', '-', strtolower( $trip->name ) );
if (file_exists(public_path() . "/" . $trip_slug . "/" . $hasEmbed . "/" . $filepath[1])) { if (file_exists(public_path() . "/" . $trip_slug . "/" . $hasEmbed . "/" . $filepath[1])) {
$path = "/" . $trip_slug . "/" .$hasEmbed . "/" . $filepath[1]; $path = "/" . $trip_slug . "/" .$hasEmbed . "/" . $filepath[1];