@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
17 lines • 850 B
TypeScript
/** What an upload ticket allows: one owner, one collection, one tenant, until it expires. */
export interface UploadTicket {
ownerType: string;
ownerId: string;
collection: string;
/** The tenant new files are stamped with (`null`: none; absent while tenancy is off). */
tenantId?: string | null;
/** The tenant's kind (`organization`, …). */
tenantKind?: string;
/** Expiry, epoch milliseconds. */
expiresAt: number;
}
/** Issue a ticket the account console's upload component sends with the file. */
export declare function issueUploadTicket(secret: string, ticket: UploadTicket): string;
/** Verify a ticket: `null` when malformed, forged or expired. */
export declare function verifyUploadTicket(secret: string, value: unknown, now?: number): UploadTicket | null;
//# sourceMappingURL=upload_ticket.d.ts.map