Get file size from uploaded attachment

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1730

    #1

    Get file size from uploaded attachment

    Hello, is it possible to retrieve the file size of an attachment in an entity by formula?
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9349

    #2
    Hi. The Attachment entity has the 'size' field.


    Code:
    $sizeInBytes = record\attribute('Attachment', $attachmentId, 'size');
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment


    • shalmaxb
      shalmaxb commented
      Editing a comment
      thank you. But even on Sunday? You should take a bit time off....
Working...