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
The maximum size of an asset is 10 MB.
To upload and manage code files to a portal, use the Custom code library web services.
| Method | Endpoint |
|---|---|
POST |
|
It is necessary to provide an Ft-Calling-App value when using Fluid Topics web services. See Fluid Topics calling app.
curl example
curl --request POST "https://docs.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-datarequest body to add files when using this web service. - When uploading a file this way, the
aliasof an asset is the key. For example, in the previous example, the key forft_logo.pngismy-image, and the key forhelvetica.ttfismy-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.