src/Floppy/Common/FileSource.php
public static function fromFile(\SplFileInfo $file)
    {
        $extension = $file instanceof UploadedFile ? $file->getClientOriginalExtension() : self::getExtension($file);

        return new self(new LazyLoadedInputStream($file->getPathname()), new FileType(self::guessMimeType($file), strtolower($extension)));
    }
public static function fromFile(\SplFileInfo $file)
    {
        $extension = $file instanceof UploadedFile ? $file->getClientOriginalExtension() : self::getExtension($file);

        return new self(new LazyLoadedInputStream($file->getPathname()), new FileType(self::guessMimeType($file), strtolower($extension)));
    }
@param \SplFileInfo $file

@return FileSource