Hubfly spaceDocs
Console

Assets & images

A managed asset is an uploaded object with delivery settings. It adds public or protected URLs, preview/stream/download controls, image transformation, and video tools. An ordinary S3 object does not automatically become a managed asset.

Register an asset

  1. Upload the source object into a project bucket.
  2. Register its bucket and objectKey with the create asset endpoint.
  3. Save the returned asset ID and URL. Update the title and delivery settings as needed.

The asset is served from the source object in its bucket, so keep that object while the asset is in use: removing it breaks the delivery URL. Deleting an asset (in the Dashboard, through the API or with hubfly storage unpublish) also deletes its source object, renditions and image variants. There is no option to unregister an asset and keep the object; copy the object first if you still need it.

With the CLI, publish registers an uploaded object and prints its delivery URL:

bash
hubfly storage publish project-assets/images/logo.png --title "Logo"      # public
hubfly storage publish project-assets/private/contract.pdf --protected     # share links only
hubfly storage share project-assets/private/contract.pdf --expires 2h
hubfly storage assets --bucket project-assets

Public and protected delivery

ModeBehaviorRecommended use
publicAnyone with the asset URL can request an allowed representation.Public product imagery and documentation.
protectedA signed, expiring share or playback token is required.Customer files and private media.

Set allowPreview, allowStream, and allowDownload to control the operations you intend to expose. A share token has a bounded lifetime. Treat its URL like a password until it expires.

Image transforms

Image URLs returned by the service can request a transform with query parameters. Use the asset URL returned in the create response; append only supported transform parameters. For example, ?w=800&h=450&fit=cover&format=webp&quality=80 requests a cropped WebP image.

ParametersPurpose and bounds
w, hOutput width and height. At least one is needed; each is at most 4,096 pixels, with at most 16 million output pixels.
fitinside (default), contain, cover, or fill. Anything except inside needs both dimensions.
format, qualitywebp (default), jpeg, or png; quality 1–100 (default 80).
fx, fyFocal point from 0 to 1 for cover, defaulting to the center.
rotate, flipRotation 0, 90, 180, or 270 degrees; flip h, v, or hv.
blur, sharpen, brightness, contrast, saturationOptional effects with service-side bounds.
wm_text or wm_keyOne watermark, with position wm_x/wm_y and opacity wm_opacity. A watermark object must be enabled for the asset.

Animated sources use the first frame for transformed output. Unsupported or repeated transform parameters are rejected, so avoid appending arbitrary query strings.

Cache and variants

The service caches generated variants and records them under its reserved .hubfly-images/ prefix. Generated bytes count toward project quota. You can inspect and delete variants through the image variant API. A source or watermark version change invalidates the old transform. The service limits an image to 100 distinct transforms per UTC day.

Keep URLs stable

Use a predictable set of image sizes in your application. Creating a different width for every user or viewport can exhaust the daily transform allowance and generate unnecessary stored variants.
Something unclear or out of date? Emailsupport@hubfly.spaceBack to top