You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2011-05-12 16:04:51

Reini
Member
Registered: 2009-10-21
Posts: 35

Web service: addTicketDocument function

Hello everybody.

Currently I am writing a client which uses the GLPI Web services plug-in. So far everything worked pretty well, but now I am facing some trouble with the addTicketDocument function. I would like to attach a document that is located on my local PC, e.g. a file called "test.txt" which is located on my C: drive. Therefore I try to use uri parameter of the addTicketDocument function and set it to "C:\test.txt". But when I execute the function I receive this error:

"[10] Not found (C:\test.txt)"

Does anybody know why, or how to use correctly this function?

Best regards.

Offline

#2 2011-05-12 16:14:18

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Web service: addTicketDocument function

Your client must use, either
- an URI which is accessible from the serveur (a http address for example)
- the base64 encoded content of the file (the simplest)

So, C:\test.txt couldn't work (isn't readble from the server)


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#3 2011-05-13 09:37:13

Reini
Member
Registered: 2009-10-21
Posts: 35

Re: Web service: addTicketDocument function

Thanks for your help.
In the meantime I was actually able to upload something by Base64-encoding the C:\test.txt file.

Thank you very much.

Offline

Board footer

Powered by FluxBB