a4a_send_file
Send an encrypted file reference and decryption key to a recipient over end-to-end encrypted messaging; the relay sees only ciphertext, and the key is deleted after sending.
Instructions
Send an encrypted-file reference (step 3 of 3, after uploading the blob).
The key is loaded from local storage by blob sha256 and deleted after successful
sending. The same blob cannot be sent again; re-encrypt the source file. The URL,
name, and key travel in an end-to-end encrypted message. The relay sees ciphertext,
while the storage provider sees only blob size.
Args:
to_pubkey: Recipient hex public key.
blob_path: Blob path returned by a4a_encrypt_file.
url: Blob location using https://, ipfs://, or ar://. Leave empty to upload the
blob through the file gateway named by A4A_FILE_GATEWAY; only the recipient
can then fetch it.
name: Recipient-visible filename; defaults to the source name.
mime: MIME type, for example application/pdf.
Returns:
Event ID confirmation or a reason the transfer was not sent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| mime | No | ||
| name | No | ||
| blob_path | Yes | ||
| to_pubkey | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |