cs-icon.svg

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 and perform the following steps:

  1. Go to your stack and click the “Assets” icon located in the left navigation panel to view the list of available assets.
  2. You can drag and drop your files directly as shown below.
    Create_Upload_Assets_1.png

    Note: You cannot drag and drop folders. Instead, create a folder and upload files to it.

  3. Alternatively, you can click on + New Asset located at the top right corner of the page.
    Create_Upload_Assets_2.png
  4. In the Upload Asset(s) modal, click Choose files to select the files from your system.
    Create_Upload_Assets_3.png
  5. After selecting your files, the upload progress and success status of the assets will be displayed, as shown below.
    Create_Upload_Assets_4.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.

Asset Details

When you click and open an asset file, the page displays the details of the uploaded file. Here’s a screenshot of the details visible about the asset:

Create_Upload_Assets_5.png

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 “_”.

The details include Title, Description, Tags, Filename, Unique ID, File URL, Permanent URL, File Location, Type, File Size, Resolution, Created By/At, Modified By/At and Referenced In sections.

  • 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
    To copy the URL of the uploaded file, click the "Click to copy" icon.
  • Permanent URL remains constant, once generated, irrespective of any further changes made to the asset.
  • You can change the File Location of the asset file by clicking on the Change location icon. By default, your file is uploaded to the folder you are currently in.
  • You will also be able to see the Type, File Size, and Resolution of the asset file.
    Create_Upload_Assets_6.png
  • The Created By/At and Modified By/At fields shows details of who created and/or modified the asset file along the date and time.

  • The Referenced In section allows you to view the list of entries and the content types in which the asset is referenced.
    Create_Upload_Assets_7.png

API Reference

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

Was this article helpful?
^