class RawUploadHandlerSupport extends UploadHandlerSupport {

  @Override
  public UploadResponse handle(final Repository repository, final ComponentUpload upload) throws IOException {
    String basePath = upload.getFields().get(DIRECTORY).trim();

    //Data holders for populating the UploadResponse
    Map<String,PartPayload> pathToPayload = new LinkedHashMap<>();

    for (AssetUpload asset : upload.getAssetUploads()) {
      String path = normalizePath(basePath + '/' + asset.getFields().get(FILENAME).trim());

      ensurePermitted(repository.getName(), RawFormat.NAME, path, emptyMap());

      pathToPayload.put(path, asset.getPayload());
    }

    List<Content> responseContents = getResponseContents(repository, pathToPayload);

    return new UploadResponse(responseContents, new ArrayList<>(pathToPayload.keySet()));
  }

  public  RawUploadHandlerSupport(
      final ContentPermissionChecker contentPermissionChecker,
      final VariableResolverAdapter variableResolverAdapter,
      final Set<UploadDefinitionExtension> uploadDefinitionExtensions);

}