mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 04:08:06 +01:00
Add v4 attachment controller
Add AttachmentControllerV4 which can be configured to generate upload forms for a TUS based CDN
This commit is contained in:
@@ -5,7 +5,22 @@
|
||||
|
||||
package org.whispersystems.textsecuregcm.entities;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.Map;
|
||||
|
||||
public record AttachmentDescriptorV3(int cdn, String key, Map<String, String> headers, String signedUploadLocation) {
|
||||
public record AttachmentDescriptorV3(
|
||||
@Schema(description = """
|
||||
Indicates the CDN type. 2 in the v3 API, 2 or 3 in the v4 API.
|
||||
2 indicates resumable uploads using GCS,
|
||||
3 indicates resumable uploads using TUS
|
||||
""")
|
||||
int cdn,
|
||||
@Schema(description = "The location within the specified cdn where the finished upload can be found")
|
||||
String key,
|
||||
@Schema(description = "A map of headers to include with all upload requests. Potentially contains time-limited upload credentials")
|
||||
Map<String, String> headers,
|
||||
|
||||
@Schema(description = "The URL to upload to with the appropriate protocol")
|
||||
String signedUploadLocation) {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user