Closed rohit-ambre-uno closed 6 years ago
Hello @rohit-ambre-uno Three questions/remarks:
What yo have to understand is that PM server is managing documents on its own, and of course not attaching uploaded document into GLPI.
We may imagine an enhancement to permit this, but as a workaround you may manage that asking your people to attach document into the Tickets (or Changes, or Problems).
Thank you Regards, Tomolimo
To answer your questions
Yes, we can attach documents in GLPI but that's inconvenient for user
It would be much easier if PM server is upgraded to newer version
If you use the self-service interface then end-users can add documents to the ticket at the same time they are doing the first task of the chosen process.
Currently the input of document is not supported by the plug-in, even if the pm server is upgraded to latest version, I'm not sure that it will change something for the plug-in.
Hello @rohit-ambre-uno
I made a modification of the function that sends Dynaform data to PM server, so that the input document will be saved into the PM server. You may test it by adding the following code:
// check if any files are in the $_FILES global array
// and add them to the curl POST
if (isset($_FILES['form']['name'])) {
foreach ($_FILES['form']['name'] as $key => $file) {
$cfile = new CURLFile($_FILES['form']['tmp_name'][$key], $_FILES['form']['type'][$key],$_FILES['form']['name'][$key]);
$data["form[$key]"] = $cfile;
}
}
This should be added into the function saveForm(...)
in the processmaker.class.php source file, just before the line $ch = curl_init();
As example, here is the complete php file (beware that this file is for version 3.3.2) processmaker.class.php.zip
Could you do some tests, and give me feedback about these?
Thank you Regards, Tomolimo
This issue was moved to tomolimo/processmaker#78
Dear @tomolimo , file upload web control is not available in processmaker-server which is very important for my use case. In processmaker 3.0 i have to use file web control for which i have to create input document which only allows me to upload only one document. if I set step as input document in designer it is not attaching documents in GLPI.
I want have multiple file upload in dynaform and which can be seen in further tasks of process.