code: 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)));
      }
docs: @param \SplFileInfo $file
  
  @return FileSource