MapsAttachments
trait MapsAttachments
Constants
| protected MAX_DOCUMENT_NAME_LENGTH |
|
Methods
array
mapAttachments(Collection $attachments)
Map the given Hypervel attachments to Bedrock content blocks.
array
array
string|null
string
string
Details
at line 33
protected array
mapAttachments(Collection $attachments)
Map the given Hypervel attachments to Bedrock content blocks.
at line 81
protected array
buildDocumentBlock(Document $document)
Build a Bedrock document content block.
at line 105
protected array
buildImageBlock(Image $image, string $bytes)
Build a Bedrock image content block.
at line 120
protected string|null
getDocumentFormat(Document $document)
Map a Document's MIME type to a Bedrock document format.
at line 148
protected string
getDocumentName(Document $document)
Build a Bedrock-compliant document name.
Bedrock limits names to 200 characters containing alphanumerics, whitespace, hyphens, parentheses, and square brackets. mapAttachments resolves duplicates.
at line 164
protected string
getImageFormat(Image $image)
Map an Image's MIME type to a Bedrock image format.
Bedrock supports JPEG, PNG, GIF, and WebP images.