To upload a new asset, log in to your Contentstack account and perform the following steps:
- Go to your stack, and click on ASSETS at the top to view the list of available assets.
- Click on New Asset located at the top right corner of the page.
- 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 Upload.
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.
- 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.
- 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 “_”.
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:
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:
By clicking on the file URL, you will be able to copy the URL of the uploaded file.
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.
Let’s see how you can add multiple assets.
To create or upload assets via API, refer to the Upload asset API request.