Large (ish) File Uploads.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rawiri
    Member
    • Sep 2021
    • 34

    Large (ish) File Uploads.

    Folks;

    I have created a new entity for a specific purpose & all works well except Large File Uploads.

    In the entity is an "attachment multiple" record type, that allows me to "attach" multiple media files to a record. Unless the file to attach is above 3.5 GB.

    I have set php.ini so that upload_max_filesize = 50G, and restarted apache2.

    I have set via Administration/Settings - Attachments Upload Max Size (Mb) to 500000.

    When attaching a file over 4GB I get the following in my espoCRM log.

    [2023-03-24 02:20:36] DEBUG: API (22003) SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'size' at row 1; POST /Attachment; Input data: {"role":"Attachment","parentType":"Streaming"," fie ld":"rawMedia","name":"replay-service-01.mp4","type":"video/mp4","size":4147549241,"isBeingUploaded":true}; Route pattern: /{controller}; Route params: Array ( [controller] => Attachment [action] => create ) [] []
    [2023-03-24 02:20:36] ERROR: (22003) SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'size' at row 1; POST /Attachment; line: 70, file: /var/www/html/diausgroup/office.diausgroup.com/application/Espo/ORM/SqlExecutor.php [] []​

    I am wondering if I am:
    a) Missing something in my entity or system configuration?
    b) Hitting some sort of "coded" limit on file size uploads.

    I would like to be able to upload multiple files between 10MB and 25GB to this entity.

    Thanks in advance.
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1602

    #2
    Hi, I am not sure, if your problem has to do with the filesize. Your log says, there is a value too big for an incerement integer, that is, you have some field with an increment value. This value is limited by MySQL to the value 2147483647. Your value must be higher, only I cannot imagine, what you put there. Did you make a field "size" as increment integer?

    long guessing short, it is a database issue not a espoCRM issue.

    Comment


    • rawiri
      rawiri commented
      Editing a comment
      Thanks for responding, not a db settings issue. It was an espoCRM settings issue. It is resolved now thanks to yuri.
  • yuri
    Member
    • Mar 2014
    • 8440

    #3
    Try adding right after this line https://github.com/espocrm/espocrm/b...hment.json#L15

    Code:
    "dbType": "bigInt",
    Then run rebuild.

    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


    • rawiri
      rawiri commented
      Editing a comment
      Yuri - Thanks, your answer helped alot.

      The solution for me is:
      "size": {
      "type": "bigInt",
      "min": 0
      },
      in Attachment.json
Working...