Add UploadAttachment, a unary RPC that accepts a file in bounded chunks and streams it to a temp file instead of holding the whole blob in one request body and in memory. A call carrying a spec starts an upload and returns an opaque upload_id; later calls carry that id with write_offset, data, and finish_write, following the Cloud Storage WriteObject shape. Retrying the last chunk after a lost response is idempotent, uploads are bound to their owner, and they expire after 30 minutes of inactivity. CreateAttachment and the chunked finalize now share one processing pipeline for motion-photo detection, EXIF stripping, and storage. The motion-photo detector works over an io.ReaderAt so large JPEGs are never loaded whole, and the request body cap is a single per-procedure lookup. The web editor uploads through the new RPC in 2 MiB chunks with bounded concurrency under the server's per-user limit. |
||
|---|---|---|
| .. | ||
| ai_service.proto | ||
| attachment_service.proto | ||
| auth_service.proto | ||
| common.proto | ||
| idp_service.proto | ||
| instance_service.proto | ||
| memo_service.proto | ||
| memo_view_service.proto | ||
| README.md | ||
| space_service.proto | ||
| user_service.proto | ||
Memos API Design
This API design should follow the guidelines and best practices outlined in the Google API Improvement Proposals (AIPs).