When uploading new assets, it is possible to include a JSON file with metadata for the uploaded assets.
Users must name this file ft-assets-metadata.json.
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" \
--form "ft-assets-metadata=@ft-assets-metadata.json;type=application/json"
Content of ft-assets-metadata.json
[
{
"alias": "my-image",
"displayName": "The new Fluid Topics logo",
"imageAltText": "A circular logo with a purple background featuring a stylized white lowercase 'f' and 't' combined to form the shape of a dolphin at the center.",
"visibility": "PUBLIC"
},
{
"alias": "my-font",
"visibility": "PORTAL"
}
]
To assign metadata to an asset, the alias value in ft-assets-metadata.json must be the same as the key used in the call to the web service.
| Field | Type | Required? | Description |
|---|---|---|---|
displayName |
String | No | The display name of a file. |
imageAltText |
String | No | The alt text for an image asset. |
visibility |
String | No | Can be PUBLIC or PORTAL.When set to PUBLIC, all users can access an asset through its URL, even when the portal requires authentication.When set to PORTAL, unauthenticated users cannot access an asset through its URL when the portal requires authentication. |