Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 10 Aug 17:22
· 2 commits to main since this release

Phoenix uploads. LiveView already owns the upload experience, so Magpie
does not ship a component — it fills the two gaps a Dropbox backend
creates: getting the bytes there without spooling them to disk, and
skipping the server altogether.

Added

  • Magpie.LiveView.UploadWriter — a Phoenix.LiveView.UploadWriter that
    streams a LiveView upload straight into a Dropbox upload session, so the
    bytes never land on the server's disk. Chunks are buffered to
    :chunk_size (default 8 MiB, Dropbox wants multiples of 4 MiB) and the
    tail rides along with the finish call. Magpie does not depend on
    :phoenix_live_view — the behaviour is a plain set of callbacks
  • Magpie.LiveView.presign_upload/4 — a LiveView :external uploader that
    mints a one-time link with Magpie.Files.get_temporary_upload_link/3 so the
    browser posts the file straight to Dropbox, bypassing the server. Entries
    above Dropbox's 150 MB single-request limit are rejected at presign time
    instead of being handed a link that cannot work. The client-side half ships
    as priv/static/magpie_uploader.js