HOME


Mini Shell 1.0
DIR: /home/cardxfeb/www/vendor/spatie/laravel-medialibrary/src/Support/FileNamer/
Upload File :
Current File : //home/cardxfeb/www/vendor/spatie/laravel-medialibrary/src/Support/FileNamer/DefaultFileNamer.php
<?php

namespace Spatie\MediaLibrary\Support\FileNamer;

use Spatie\MediaLibrary\Conversions\Conversion;

class DefaultFileNamer extends FileNamer
{
    public function conversionFileName(string $fileName, Conversion $conversion): string
    {
        $strippedFileName = pathinfo($fileName, PATHINFO_FILENAME);

        return "{$strippedFileName}-{$conversion->getName()}";
    }

    public function responsiveFileName(string $fileName): string
    {
        return pathinfo($fileName, PATHINFO_FILENAME);
    }
}