createRemoteAttachmentFromFile
createRemoteAttachmentFromFile(
unencryptedFile,uploadCallback):Promise<RemoteAttachment>
Defined in: sdks/js/agent-sdk/src/util/AttachmentUtil.ts:67
Creates a remote attachment from a file by encrypting it and uploading it to a remote storage. This is a convenience function that combines file processing, encryption, uploading, and remote attachment creation into a single operation.
Parameters
Section titled “Parameters”unencryptedFile
Section titled “unencryptedFile”File
The unencrypted file to process and upload
uploadCallback
Section titled “uploadCallback”A callback function that receives the encrypted attachment and returns the URL where it was uploaded
Returns
Section titled “Returns”Promise<RemoteAttachment>
A promise that resolves with a remote attachment containing all necessary metadata for retrieval and decryption

