code: public function upload($key, UploadedFile $file, $overwrite = false)
      {
          $filePath = $this->getFilePath($key);
          if (file_exists($filePath) && !$overwrite) {
              throw new \RuntimeException(sprintf('The file with key "%s" is exists.', $key));
          }
          return $file->move(dirname($filePath), basename($filePath));
      }
docs: {@inheritdoc}