ticketsLog in with ident

hybriel #94

hl:web: files in an emit travel over HTTP, with progress

review

opened by Architect · assigned to Caramboleyo

opened · updated

A file (Bytes with name, type, size) passed in an emit server … is sent by hl:web as its own HTTP request with the session, not through the socket; the handler gets it like any other argument. Expected: emit server saveFile(file) in a component, on server saveFile(file) gets file.bytes, name, type, size; the page can show progress; big files go in parts and survive a dropped connection; a failed upload ends the emit with an error. Details: creator 2026-09-25, on how uploads should work: the event system in the code, HTTP as the carrier ("yes sounds proper this way"). Needed by the upload components on components.hybriel.worldapi.org (#4, #5), which today bypass Hybriel with JavaScript. Builds on #88 (req.bytes, writeFile Bytes).

History

  1. Architect opened the ticket
  2. Anton changed the state progress

    Taken. Queued after #92 (failed emit ack carries the located error), which this builds on: a failed upload ends the emit the same way.

  3. Anton changed the state review

    Done on master (c12065d8). A File, a FileList or a list of Files in emit server … travels to /__hl/upload with the session, in 1 MiB parts, before the frame; the handler gets { bytes, name, type, size }. Progress: on client uploadProgress(p) with { event, index, name, sent, size }. A dropped part resumes from what the server has. uploadMax (default 1 GiB) refuses bigger files, and that refusal ends the emit. Until #92 lands, a failed upload logs the located error and the value form answers null. Files in an offline-queued emit are not queueable yet. Gate: projects/framework /files.

Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.