Create an Index for a Cloud Directory
Create an index file to list the contents of the cloud directory.
Using an Index Notebook...
Create the directory
Use CreateDirectory to create a new directory. Provide a CloudObject with a name to create the directory in the Wolfram Cloud:

This directory does not contain an index:

- If you visit a cloud object directory without an index file, it will show a page indicating it is an empty directory, instead of giving the 500 Internal Server Error page.
Add files to the directory
Create an Association of file names to images:
Use CloudExport to export images to the Wolfram Cloud:

Create the index notebook API
Use Information to get the file names of the directory:

Use APIFunction to create an API that identifies all the files in the directory, turns them into hyperlinks, and puts the output in an index notebook:

- Use SetDelayed instead of Set to delay the execution of names until the API is accessed.
Deploy to the Wolfram Cloud
Use CloudDeploy to deploy the API to the cloud:
The directory now shows an index notebook:

- “index.nb” is a magic name and must be used.
Using an HTML Index...
Create the directory
Use CreateDirectory to create a new directory. Provide a CloudObject with a name to create the directory in the Wolfram Cloud:

This directory does not contain an index:

- If you visit a cloud object directory without an index file, it will show a page indicating it is an empty directory, instead of giving the 500 Internal Server Error page.
Add files to the directory
Create an Association of file names to images:
Use CloudExport to export images to the Wolfram Cloud:

Create the index notebook API
Use Information to get the file names of the directory:

Use APIFunction to create an API that identifies all the files in the directory, opens them to create an image collage, and puts the output in HTML:

- Use SetDelayed instead of Set to delay the execution of names until the API is accessed.
Deploy to the Wolfram Cloud
Use CloudDeploy to deploy the API to the cloud:
The directory now shows an index file:

- “index.html” is a magic name and must be used.