1. Amazing Product, and Support ty
2. I’m Having difficulty with the HTTP POST request to send 1 or more .pdf files to an API endpoint, after successful Parsing then save and rename.
• The First request sends the parsed strings as JSON ob, to API and returns “200 Success”.
• The 2nd POST attempts to “/addFile/“, and returns 500. ( it’s well documented API and server is capable ).
• My Headers also have the “Content-type”: “application/pdf” as docs suggest.
Any suggestions or any additional documentation on the HTTP Req in the actions section?
2. I’m Having difficulty with the HTTP POST request to send 1 or more .pdf files to an API endpoint, after successful Parsing then save and rename.
• The First request sends the parsed strings as JSON ob, to API and returns “200 Success”.
• The 2nd POST attempts to “/addFile/“, and returns 500. ( it’s well documented API and server is capable ).
• My Headers also have the “Content-type”: “application/pdf” as docs suggest.
Any suggestions or any additional documentation on the HTTP Req in the actions section?
Hi Hugh,
Thanks
Unfortunately the HTTP request action in Email Parser does not support file uploading. It only works with text (field values), not the contents of a file.
However, you can use script action in C# that calls the method WebClient.UploadFile() to upload the file. I have written this but I am not sure if it works as I do not have a web server for testing. I hope that, at least, it helps.
using System;
using System.Text;
using System.IO;
using System.Net.Mail;
using System.Collections.Specialized;
using EmailParserBackend.ScriptingInterface;
public class MyAction : ScriptBasedAction
{
public override bool Run(MailMessage email, NameValueCollection fields)
{
string file_path = fields["SavedAttachmentPath"];
System.Net.WebClient my_web_client = new System.Net.WebClient();
my_web_client.UploadFile("https://www.hugh-server.com/addFile/",file_path);
return (true);
}
}
Thanks

Unfortunately the HTTP request action in Email Parser does not support file uploading. It only works with text (field values), not the contents of a file.
However, you can use script action in C# that calls the method WebClient.UploadFile() to upload the file. I have written this but I am not sure if it works as I do not have a web server for testing. I hope that, at least, it helps.
using System;
using System.Text;
using System.IO;
using System.Net.Mail;
using System.Collections.Specialized;
using EmailParserBackend.ScriptingInterface;
public class MyAction : ScriptBasedAction
{
public override bool Run(MailMessage email, NameValueCollection fields)
{
string file_path = fields["SavedAttachmentPath"];
System.Net.WebClient my_web_client = new System.Net.WebClient();
my_web_client.UploadFile("https://www.hugh-server.com/addFile/",file_path);
return (true);
}
}
There’s no where on the web you can get the creater/developer to hand write a solution, In under 12hrs.
Outstanding.
Thank you again, Sr. Andrés
-HB
Outstanding.
Thank you again, Sr. Andrés
-HB
update:
putting this one together finally... C# is tricky to learn!
Will update again when I have a working version.
This software is still a daily lifesaver. Thank you
putting this one together finally... C# is tricky to learn!
Will update again when I have a working version.
This software is still a daily lifesaver. Thank you
You are welcome 

- All times are UTC -
