Announcement

Collapse
No announcement yet.

cannot upload file bigger than 12KB

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • cannot upload file bigger than 12KB

    Hi,
    I cannot upload documents or create email with attachment larger than 12 KB.
    php.ini settings for upload_max_filesize and post_max_size both are set to 50M

    When I upload file < 12KB the response from /api/v1/Attachment looks as follows:
    {"id":"5b22c6bcbacaeb5d5","name":"img_001.png_very High.png","deleted":false,"type":"image\/png","size":12079,"field":"file","createdAt":"201 8-06-14 19:49:16","role":"Attachment","storage":null,"glob al":false,"relatedType":"Document","createdById":" 1"}

    When the file is larger then the response looks like:
    {"id":"5b22c6fa541e6e7cf","deleted":false,"created At":"2018-06-14 19:50:18","storage":null,"global":false,"createdBy Id":"1"}

    and in this case in data/logs I can see these two warnings:

    [2018-06-14 20:07:09] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/var/www/application/Espo/Services/Record.php","line":607,"context":{"data":""}} []
    [2018-06-14 20:07:09] Espo.WARNING: E_WARNING: get_object_vars() expects parameter 1 to be object, string given {"code":2,"message":"get_object_vars() expects parameter 1 to be object, string given","file":"/var/www/application/Espo/Services/Record.php","line":786,"context":{"entity":"[object] (Espo\\Entities\\Attachment: {"id":"5b22caed946acfd3c","fields":{"id":{"dbType" :"varchar","len":24,"type":"id"},"name":{"type":"v archar","len":255},"deleted":{"type":"bool","defau lt":false},"type":{"type":"varchar","len":100},"si ze":{"type":"int","len":11},"sourceId":{"type":"va rchar","len":36,"index":true},"field":{"type":"var char","len":255},"createdAt":{"type":"datetime","n otNull":false},"contents":{"type":"text","notStora ble":true},"role":{"type":"varchar","len":36},"sto rage":{"type":"varchar","len":24},"storageFilePath ":{"type":"varchar","len":260},"global":{"type":"b ool","notNull":true,"default":false},"parentId":{" dbType":"varchar","len":24,"type":"foreignId","ind ex":"parent","notNull":false},"parentType":{"type" :"foreignType","notNull":false,"index":"parent","l en":100,"dbType":"varchar"},"parentName":{"type":" varchar","notStorable":true,"relation":"parent","i sParentName":true},"relatedId":{"dbType":"varchar" ,"len":24,"type":"foreignId","index":"related","no tNull":false},"relatedType":{"type":"foreignType", "notNull":false,"index":"related","len":100,"dbTyp e":"varchar"},"relatedName":{"type":"varchar","not Storable":true,"relation":"related","isParentName" :true},"createdById":{"dbType":"varchar","len":24, "type":"foreignId","index":true,"notNull":false}," createdByName":{"type":"foreign","notStorable":fal se,"relation":"createdBy","foreign":["firstName"," ","lastName"]}},"relations":{"related":{"type":"belongsToParent ","key":"relatedId"},"parent":{"type":"belongsToPa rent","key":"parentId"},"createdBy":{"type":"belon gsTo","entity":"User","key":"createdById","foreign Key":"id","foreign":null}}})","data":""}} []

    what's wrong with my installation pls?

    EspoCRM ver. 5.2.4
    OS: Ubuntu 18.04
    WebServer: Apache2 Http Server
    PHP: 5.6.33

  • #2
    solved problem was in unwritable upload_tmp_dir

    Comment

    Working...
    X