glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.24k stars 1.29k forks source link

[9.1.6] Issue with API - file upload doesn't work #2609

Closed ppatalong closed 3 years ago

ppatalong commented 7 years ago

Hey,

I am trying to upload file to GLPI using C# code, but every method I tried failed. After some googling I've found this project but even those CURL and php examples results in the same error: {"id":35,"message":"File /home/glpi-clean/public_html/files/_tmp/file.txt not found."} GLPI creates document, but file is not uploaded. I tried to copy document to the specified location manually and this does the trick, but obviously isn't a solution....

Another example with CURL: obraz

Do you have any ideas why it may not work? Maybe it's a configuration issue? I am running clear instance of GLPI (GLPI 9.1.6 ( => /home/glpi-clean/public_html)) created by our system admins.

GlPI Info:

[code]

GLPI 9.1.6 ( => /home/glpi-clean/public_html)

Operating system: Linux vm-www-it 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64
PHP 7.0.22-0ubuntu0.16.04.1 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apcu,
    bcmath, bz2, calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, json, ldap,
    libxml, mbstring, mcrypt, mysqli, mysqlnd, openssl, pcre, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, posix, readline,
    session, shmop, soap, sockets, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter,
    xsl, zip, zlib)
Setup: max_execution_time="60" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files"
    upload_max_filesize="2M" 
Software: Apache/2.4.18 (Ubuntu) (Apache/2.4.18 (Ubuntu) Server at <cut> Port 443)
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
Server Software: (Ubuntu)
    Server Version: 5.7.19-0ubuntu0.16.04.1

htmLawed version 1.1.21 in (/home/glpi-clean/public_html/lib/htmlawed)
phpCas version 1.3.5 in (/home/glpi-clean/public_html/vendor/jasig/phpcas/source)
PHPMailer version 5.2.23 in (/home/glpi-clean/public_html/vendor/phpmailer/phpmailer)
Zend Framework in (/home/glpi-clean/public_html/vendor/zendframework/zend-loader/src)
zetacomponents/graph in (/home/glpi-clean/public_html/vendor/zetacomponents/graph/src)
SimplePie version 1.5 in (/home/glpi-clean/public_html/vendor/simplepie/simplepie/library)
TCPDF version 6.2.12 in (/home/glpi-clean/public_html/vendor/tecnickcom/tcpdf)
michelf/php-markdown in (/home/glpi-clean/public_html/vendor/michelf/php-markdown/Michelf)
true/punycode in (/home/glpi-clean/public_html/vendor/true/punycode/src)
iacaml/autolink in (/home/glpi-clean/public_html/vendor/iamcal/lib_autolink)
sabre/vobject in (/home/glpi-clean/public_html/vendor/sabre/vobject/lib)
github-actions[bot] commented 3 years ago

There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.

If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue. If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.

You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.