PUT, so the upload URL is safe to hand to a client.
upload_presigned
Presign, stream thePUT and confirm, in one call. This is the path for large files on
your own server: the bytes are streamed from disk in 1 MB chunks and never held in memory.
upload(), plus:
The source must be size-aware — a
Path, bytes, or a seekable file object — because
storage is told the exact size up front. The confirm is retried while the bytes settle, so
the 409 the API answers in that window is handled for you.
presign_upload
Start the flow yourself when the bytes are uploaded by someone else, typically a browser.The browser flow
confirm_upload() is what turns the stored bytes into
an asset. Until it runs, the upload is not listed by
list_media().