@adonis-agora/media
Version:
Media-library for AdonisJS — owner collections (MIME whitelist, single-file replace, ordering), image conversions (eager/lazy), pluggable content transformers (HLS video via mediabunny, metadata probe, image blur-up placeholder), and column attachments, a
13 lines • 608 B
JavaScript
/**
* Same-origin URL for the console's object-byte route, rooted at the API mount.
*
* Query params rather than the NestJS sibling's `/disks/:disk/object/raw` path segment because that
* is the shape this console's route already has (`dashboard_provider.ts`) — the SPA's own
* `objectRawUrl()` builds the identical URL, which is what makes a `proxy` `url` interchangeable
* with it.
*/
export function objectProxyUrl(apiBasePath, disk, key) {
const query = new URLSearchParams({ disk, key });
return `${apiBasePath}/object/raw?${query.toString()}`;
}
//# sourceMappingURL=object_urls.js.map