import type { ApplicationService } from '@adonisjs/core/types'; import { type Disk } from 'flydrive'; export declare const PREVIEWABLE_MIME_TYPES: Record; /** * Wraps a temporarily-uploaded file living on this package's internal * upload Disk. Reconstructed on every hydrate from just the tmp filename * (which itself encodes the original client name) — no extra snapshot * state needed. * PHP parity: TemporaryUploadedFile */ export declare class TemporaryUploadedFile { private disk; private tmpFilename; constructor(disk: Disk, tmpFilename: string); /** * PHP parity: getClientOriginalName() */ getClientOriginalName(): string; /** * PHP parity: getSize() */ getSize(): Promise; /** * PHP parity: getMimeType() */ getMimeType(): Promise; /** * PHP parity: isPreviewable() */ isPreviewable(): boolean; /** * PHP parity: temporaryUrl() */ temporaryUrl(): Promise; /** * PHP parity: exists() */ exists(): Promise; /** * PHP parity: delete() */ delete(): Promise; /** * Moves the tmp file to permanent storage under app storage//, using * Node fs directly. If no app option is provided, uses AdonisJS core app service. * PHP parity: store() */ store(path: string, options?: { name?: string; app?: ApplicationService; } | string): Promise; /** * The tmp filename as stored on the upload disk — used by _removeUpload * and the cleanup command to target this exact file. */ getTmpFilename(): string; /** * PHP parity: serializeForLivewireResponse() */ serializeForLivewireResponse(): string; /** * PHP parity: canUnserialize() */ static canUnserialize(value: unknown): boolean; /** * PHP parity: unserializeFromLivewireRequest() * * `value` ultimately traces back to client-controlled request data (a property * update payload can carry an arbitrary `livewire-file:...` string through * `/livewire/update`, independent of the actual upload flow), so the embedded tmp * filename is guarded here at the source — this is the only construction site * that isn't already covered by a caller-side `assertValidTmpFilename` check * (`_finishUpload`, `_removeUpload`, and the preview route all guard themselves). * Throwing here on a malformed/traversal-shaped value is intentional and * consistent with those other 3 sites: surfacing a clear error beats silently * constructing a wrapper that points at an invalid or dangerous path. */ static unserializeFromLivewireRequest(disk: Disk, value: string): TemporaryUploadedFile; }