Esri / Esri/solution.js

Align Hub & Solution "Resource" models

Open
#308 0 comments 0 reactions 1 assignee Claimed by @dbouwman View on GitHub
A - enhancement B - Moderate
Dominant language
TypeScript
Stars
48
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Hub needs to pass in "template" object graphs that are not backed by Solution Items - and this must support uploading of "resources" (images & thumbnails)

The individual templates have an `.assets` array that includes the `name`, `type` and `url`

During item creation, the type-specific module reads assets entries, and the url is used to fetch the resource, and then it is uploaded as a resource of the newly created item.

In my quick read of Solution.js, the individual templates have a `resources` array that is composed of file paths. The paths look like they encode resource folders from the source item, as well as the file name.

I believe if we make the "resource handler" a little "smarter" - i.e. if the entry in the array starts w/ `http` then it should treat it as a full url and not do further processing) then we can align the two systems.

I'll also be putting up a PR to add Solution `schemaVersion` and migration system (#268), which will allow us to perform on-the-fly json translations, which will allow conversion of existing hub-created-solution items into the format supported by Solution.js

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.