/* * Copyright 2026 Signal Messenger, LLC * SPDX-License-Identifier: AGPL-3.0-only */ syntax = "proto3"; option java_multiple_files = true; package org.signal.chat.attachments; import "org/signal/chat/common.proto"; import "org/signal/chat/require.proto"; import "org/signal/chat/errors.proto"; import "org/signal/chat/tag.proto"; service Attachments { option (require.auth) = AUTH_ONLY_AUTHENTICATED; // Retrieve an upload form that can be used to perform a resumable upload rpc GetUploadForm(GetUploadFormRequest) returns (GetUploadFormResponse) {} // Retrieve an upload form that can be used to upload a sticker pack rpc GetStickerUploadForm(GetStickerUploadFormRequest) returns (GetStickerUploadFormResponse) {} } message GetUploadFormRequest { // The length of the attachment for the requested upload form. Uploads // performed with this form will be limited to the provided length. uint64 uploadLength = 1 [(require.range) = {min: 1}]; } message GetUploadFormResponse { oneof outcome { common.UploadForm upload_form = 1; // The request size was larger than the maximum supported upload size. The // maximum upload size is subject to change and is governed by // `global.attachments.maxBytes` errors.FailedPrecondition exceeds_max_upload_length = 2 [(tag.reason) = "oversize_upload"]; } } message GetStickerUploadFormRequest { // The number of stickers in the sticker pack to upload uint32 sticker_count = 1 [(require.range) = {min: 1, max: 201}]; } message GetStickerUploadFormResponse { // A randomly-generated ID for the new sticker pack string pack_id = 1; // An upload form clients must use to upload a manifest for the sticker pack common.S3UploadForm manifest_upload_form = 2; // Upload forms for individual stickers within the sticker pack repeated common.S3UploadForm sticker_upload_forms = 3; }