How to use the @esri/arcgis-rest-portal.addItemResource function in @esri/arcgis-rest-portal

To help you get started, we’ve selected a few @esri/arcgis-rest-portal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Esri / solution.js / packages / common / src / restHelpers.ts View on Github external
id: createResponse.id,
                    resource: file,
                    name: file.name,
                    authentication: authentication,
                    params: {}
                  };

                  // Check for folder in resource filename
                  const filenameParts = file.name.split("/");
                  if (filenameParts.length > 1) {
                    addResourceOptions.name = filenameParts[1];
                    addResourceOptions.params = {
                      resourcesPrefix: filenameParts[0]
                    };
                  }
                  updateDefs.push(portal.addItemResource(addResourceOptions));
                });
              }
github Esri / solution.js / packages / common / src / resourceHelpers.ts View on Github external
});
  }

  const addRsrcOptions = {
    id: itemId,
    resource: blob,
    name: filename,
    authentication: authentication,
    params: {}
  };
  if (folder) {
    addRsrcOptions.params = {
      resourcesPrefix: folder
    };
  }
  return portal.addItemResource(addRsrcOptions);
}