- Wed Sep 19, 2018 11:52 pm
#816179
The only way to import a process with the REST API is to import the process's .pmx file.
See:
https://wiki.processmaker.com/3.0/REST_ ... ortProject
PS: You can't do this using JavaScript, because JavaScript generally doesn't have access to files on the computer for security reasons. You might get it to work using AJAX to get the file or you might have to convert the file to base64 encoding. It is better to stick to a language like PHP, which designed to directly access files.
PS: I updated the code example in the documentation to use CURLFile(), instead of @ to access the project file
See:
https://wiki.processmaker.com/3.0/REST_ ... ortProject
PS: You can't do this using JavaScript, because JavaScript generally doesn't have access to files on the computer for security reasons. You might get it to work using AJAX to get the file or you might have to convert the file to base64 encoding. It is better to stick to a language like PHP, which designed to directly access files.
PS: I updated the code example in the documentation to use CURLFile(), instead of @ to access the project file