This web service allows PORTAL_ADMIN
and ADMIN
users to upload files to the Asset library.
It is only possible to upload assets in the following formats:
-
Images:
- JPG
- PNG
- GIF
- SVG
- WEBP
-
Fonts:
- EOT
- OTF
- TTF
- WOFF
- WOFF2
To upload and manage code files to a portal, use the Custom code library web services.
Method | Endpoint |
---|---|
POST |
|
curl example
curl --request POST "https://doc.fluidtopics.com/api/admin/portal/assets" \
--header "Authorization: Basic XXX" \
--form "my-image=@ft_logo.png;type=image/png" \
--form "my-font=@helvetica.ttf;type=font/ttf"
- Use a
multipart/form-data
request body to add files when using this web service. - When uploading a file this way, the
alias
of an asset is the key. For example, in the previous example, the key forft_logo.png
ismy-image
, and the key forhelvetica.ttf
ismy-font
.
- Using a key that is already used as alias in the Asset library updates the existing asset.
- The key can only have one or more of the following characters: uppercase or lowercase letters, digits, hyphens, and periods.
- The portal has a storage limit of 1.00 GB.
To set a custom alias, image alt text, or display name, follow Upload assets with metadata.