Create/Upload Assets

You can start adding assets directly into your default root location, or you can create folders and upload your assets within them.

Note: You can create, update, delete, and refer assets only within specific branches of your stack. For example, if you upload an asset within the development branch, you will be able to use or access this asset only within the development branch. The assets added within any branch other than the main branch will contain the branch UID in the URL. Refer to our Branch-specific Modules document for more information.

To upload a new asset, log in to your Contentstack account, go to your stack and perform the following steps:

  1. Click on the “Assets” icon (press “A”) on the left navigation panel to view the list of available assets.
  2. Click on New Asset located at the top right corner of the page.Upload_Assets_1_highlighted.png

  3. In the dialog box that opens, click to select the files from your system or drag and drop your files into the dialog. Once done, click on Choose files.Upload_Assets_upload_modal_no_highlight.png
    You can also see the upload status of the assets, as shown below:Upload_Assets_upload_status_no_highlight.png

    Note: Currently, using the dialog, you can only select up to 10 assets at a time. The size of an asset file should not exceed 700 MB.

  4. If fewer than 10 files are uploaded and you want to add more, click on the Add more assets button (as seen in the above screenshot), add files, and click on Upload.
  5. Click on Done if you are done uploading all assets.

Note: When an image with spaces in its name is uploaded to the assets, the spaces are converted to underscores “_”. And, the URL is formed using the filename of the asset, i.e. with the “_”.

Asset Details

When you click to open an asset file, the page displays the details of the uploaded file. Here’s a screenshot of the “Asset Details” page:

Upload_Assets_asset_details_no_highlight.png

The details include Filename, Unique Id, File URL, Folder, Type, File Size, Created, and Modified.

The Filename is the name of your asset file.

Each asset is identified uniquely with a separate API interface key or a Unique ID, and so you can upload multiple files with the same name or upload the same file multiple times.

The asset File URL is auto-generated when you upload an asset file, and it follows the default Asset URL pattern:

https://{base_url}/v3/assets/{stack_api_key}/{asset_uid}/{version_uid}/filename

By clicking on the file URL, you will be able to copy the URL of the uploaded file.

Upload_Assets_asset_details_copy_link_highlighted.png

You can change the Folder location of the asset file (by default, your file gets uploaded to the folder in which you currently are) by clicking on the change link beside the Folder parameter (see "Asset Details" page screenshot).

You will also be able to see the Type and File Size of the asset file. The Created and Modified fields shows details of who created and/or modified the asset file along the date and time.

API Reference

To create or upload assets via API, refer to the Upload asset API request.

Was this article helpful?

Thanks for your feedbackSmile-icon

On This Page

^