Upload Content to Atlas App Services
On this page
Overview
You can upload content to App Services from the Hosting screen of the App Services UI or by importing an application directory that includes the files. Select the tab below that corresponds to the method you want to use.
Procedure
Upload Files to Atlas App Services
You can upload files to App Services individually or select multiple files or file directories to upload simultaneously. All files that you upload must be available on your local filesystem.
There are two ways to upload files through the App Services UI. You can use either of the following methods:
Drag and drop files from your local filesystem on to the Hosting screen.
Click Upload Files and select the files you wish to upload from a file picker.
Once you have dropped in or selected your files, App Services will begin uploading them immediately. The rate of upload time will vary depending on network connection speed and the number and size of the files selected.
Note
Enable hosting in the UI
Before you start using the App Services CLI with Static Hosting, you must enable hosting in the App Services UI.
Add a Metadata Configuration File
To deploy hosted files through the App Services CLI you must include a
metadata.json
file in the /hosting
directory. If the
configuration file does not exist, create it:
touch hosting/metadata.json
The configuration does not need to specify metadata for any files but must be present. For more information, see Configure File Metadata.
[ { "path": "<File Resource Path>", "attrs": [ ..., <Attribute Definition> ], }, ... ]
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
path | Required. The resource path of the
file. | ||||||||||
attrs | Required. An array of documents where each document represents a single metadata attribute. Attribute documents have the following form: Metadata Attribute Document
|
Note
If you include an entry in metadata.json
for a file that does
not exist, you will not be able to import your changes. The
metadata.json must only have hosted files represented.
Add Files to the Hosting Directory
To upload or edit files, add them to the /hosting/files
subdirectory of your application directory. When you import your
application, App Services will map this subdirectory to the root of your
application's hosted file tree.
Note
You can nest additional directories inside of the
/hosting/files
subdirectory. Nested directories are listed
before a file's name in its resource path.