code: private function scanFiles($extension)
      {
          $files = [];
          foreach (Finder::create()->in($this->uploadPath)->name('*.' . $extension)->getIterator() as $item) {
              $files[] = 'files/' . Path::normalize($item->getRelativePathname());
          }
  
          return $files;
      }
docs: Scan for files with the given extension.
  
  @param string $extension The file extension.
  
  @return array