Streaming and asynchronous jobs
Streaming to the browser
A Route Handler can forward the streaming API directly asReadableStream, without buffering the entire document in server memory:
app/api/convert/stream/route.ts
ReadableStream native or a streaming library of your choice:
Server Actions do not support response streaming (they are serialized RPC calls, not raw
Response calls). For actual streaming to the client, use a Route Handler.Jobs due to saturation (202) in Server Actions
TheconvertFormData and convertUrlAction helpers inherit autoPoll from SDK of Node.js (enabled by default): if the server responds 202, the Server Action waits internally for the poll and returns the final Markdown once completed.
app/actions.ts
Manual poll from the client
app/api/jobs/[id]/route.ts
