Upload assets - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

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
/api/admin/portal/assets

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 for ft_logo.png is my-image, and the key for helvetica.ttf is my-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.