The problem

You get his “Upload incomplete. Failed files:” followed by the affected files error, when trying to add a file to a ticket or followup on GLPI using Gapp.

Why is this error popping up following no apparent pattern?

It will show whenever you try to upload a file with a size bigger than your max PHP file upload configuration.

How do I know which is the max size of an allowed file upload to GLPI?

There is a number of ways to achieving this, been the easiest checking on your GLPI New ticket form. 2 MB is the default as you can see on the image below.

GLPI file upload limit - File (2 Mio max)

How do I fix this error?

Short answer

You need to increase the ability to upload files on your GLPI tweaking your PHP web server configuration.

Long answer

You need to modify these two PHP core directives:

  • post_max_size. “Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize“. post_max_size on PHP documentation.
  • upload_max_filesize. “The maximum size of an uploaded file”. upload_max_filesize on PHP documentation.

1. Decide what will be the biggest file you will need to upload to GLPI.

If you want to upload 10 files, 5 MB each,  you’ll need to set post_max_size > 50M, and upload_max_filesize > 5M, you need to set:

->  It seems your device has gone out of memory on Gapp

upload_max_filesize = 5M

post_max_size = 50M

There is a number of ways of modifying PHP directives. This howto will work for a standard LAMP environment with Debian / Ubuntu as OS. Depending on your OS and webserver of choice, steps could vary.

2. Find your webserver php.ini

On Debian, Ubuntu and derivatives with Apache: /etc/php/[php_version]/apache2/php.ini

Again, depending on your OS and webserver, php.ini path could vary.

3. Edit php.ini

Using your prefered editor, search for post_max_size and upload_max_filesize and modify its values accordingly. Following the previous example:
upload_max_filesize = 5M

post_max_size = 50M

4. Restart your webserver

service apache2 restart
or
systemctl restart apache2.service

Afterwards, you can check on your GLPI if the File Max value has been updated, and retry your uploads using Gapp.