Files
Create secure
Auth: User JWT
Secure chat-attachment upload (v2). Stores the file in the private secure bucket and binds it to a chat (roomName). Downloads are then gated per-fetch by chat membership and served from the secure files domain, so the returned location points at secure-files.<domain> (fetch it with the fileToken cookie on web, or ?ft=<fileToken> on native/embedded clients). The caller must be a member of chatName. On a server without a secure files host the route answers 503 SECURE_FILES_DISABLED; upload through POST /v1/files instead (the public files bucket).
post/v2/files/secure
Request
- Base URL: https://api.chat.ethora.com
- URL: https://api.chat.ethora.com/v2/files/secure
- Auth: HTTP bearer
Response
{
success: boolean,
results: [{
userId: string,
ownerKey: string,
location: string, // https://secure-files.<domain>/<bucket>/<key>
locationPreview?: string,
originalname: string,
filename: string,
mimetype: string,
size: number,
objectKey: string,
roomName: string, // the chat the file is bound to
clientEncrypted: boolean, // bytes are client-side ciphertext
_id: string,
createdAt: string,
updatedAt: string,
}],
}
Changes
No recorded changes to this operation across all 1 revision of this API.