Web app to serve only images

Hi,

I would like to create a WebApp that contains only images in a folder structure to be consumed by another app. Do I have to create a new Angular project for this or what is the bare minimum for Cumulocity to make the images accessible via /apps//folder1/image1.jpg?

I believe the bare minimum is to have the cumulocity.json manifest present with the appropriate fields.

example

{
  "contextPath": "folder1",
  "availability": "MARKET",
  "type": "HOSTED",
  "name": "myImages",
  "key": "myImages-key",
  "uiHide": true,
  "noAppSwitcher": true
}
1 Like

What is the use case behind that? Instead of creating a seperate app, why not uploading the images using the Files repository (administration/index.html#/files) in the admin app, and then managing the access e.g. via tenant options (using the Tenant Option plugin) in the consuming app? That way you would not need to upload new versions of the pure image app, but instead could just update your tenant options.

There should not be a need to even have a cumulocity.json file. You can also just upload a zip file containing your desired folder structure and images.

Using a hosted web app instead of the file repository has the benefit that the images will be cached on client side. Only downside might be that your images are in general publically available…

Reason is that we want to have a folder structure to group images and want to have all images in a single location. There are already several hundred files in the File repository making it hard to track.

If you have access to the tenant, right?

No, the static files served by Cumulocity’s application hosting feature are publicly available and do not require a login to access them.
So in case you know the path to a file, you can access it.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.