Share ideas, ask questions, and get feedback about developing for ProcessMaker

Moderator: amosbatto

Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
#784318
Hi,
I need some help with uploading a document as input document via API as described in the PHP example at this link: http://wiki.processmaker.com/REST_API_C ... t-document

No matter what I'm doing, I keep getting the error: 400, Bad Request: This filename does not exist!.
When looking into the PM classes seems like the $_FILES is always empty. I'm new to APIs, I have no idea how debug further.

Please, let me know if anyone managed to use that piece of code to post an input-document (from another machine).

regards,
/d.
#785657
Hi Amosbatto,

I'm using asp.net for saving file and passing path as parameter.
like:-
{
"inp_doc_uid":"test10111124322509756bc1b5test10",
"tas_uid": "24322509756bc1b5012c202012716621",
"app_doc_comment": "test",
"form":"workflow/public_html/test.txt"
}

Response:- "message": "Bad Request: This filename does not exist!"

Can you suggest me ,what's the issue and how to solve? Please.....
Thanks
#785683
Mohinish,
Your "form" needs to be a file location on the machine executing the code. Web URLs do not work. If you want to use a web URL, you need to download the file and save it to a local file, which can then be uploaded to REST.
#785746
Hi,

I'm uploading file by using REST API while posting everything is fine but request status is 302 Found.
Please find attached Screen shot for API Request.
(28 KiB) Downloaded 10 times
Post Data are below:-
--------------------------------------------------------------------------------------------
-----------------------------71042153412624
Content-Disposition: form-data; name="0"; filename="Capture.PNG"
Content-Type: image/png

‰PNG

���
IHDR��A��c���ãÕÓ���sRGB�®Îé���gAMA��±üa���
-----------------------------71042153412624
Content-Disposition: form-data; name="inp_doc_uid"

test10111124322509756bc1b5test10
-----------------------------71042153412624
Content-Disposition: form-data; name="tas_uid"

24322509756bc1b5012c202012716621
-----------------------------71042153412624
Content-Disposition: form-data; name="app_doc_comment"

test
-----------------------------71042153412624--

---------------------------------------------------------------------------------------------
After That i'm not receiving any Response
& Request Status 302 Found.
Can anyone help in that?

Thanks You
#795722
FelipeSolis wrote:Hi, I'm facing this problem with .NET too. API always return file does not exist. I would like to know if there is another way to upload the file input
Are you trying to use a web uploader like this or are you trying to run a script which uploads a file which already exists on the computer? Post your code. I don't know anything about .NET, but maybe I can spot something if I look at your code.

I cleared the logs in shared/log but it still erro[…]

Thanks amosbatto, How can i create a new plugin […]

Hi coworker the problem seems to be found and so[…]

if you want run a development area you can use vir[…]