Extract attachment
QUERY: Please inform how the attachment can be extracted from the stream.
Frevvo form posting data (xml and attachment) to a web service.
Web service creates an issue in bug tracking system with the data received from the Frevvo form. XML doc is extracted from the stream as below and various elements accessed.
private void RequestStreamCustom(Stream inStream)
{
StreamReader sreader = new StreamReader(inStream);
string xml = sreader.ReadToEnd();
sreader.Close();
int startPos = xml.IndexOf("<ns:form");
int endPos = xml.IndexOf("</ns:form>");
string data = xml.Substring(startPos, (endPos + 10) - (startPos));
XmlDocument doc = new XmlDocument();
doc.LoadXml(data);
Please inform how the attachment can be extracted from the stream.
THANKS,
-
SubmissionEntry.getDocumentLinks(String contentType)) returns all the documents associated with the submission and this includes file upload attachments in addition to the XML document(s)
Please take a look at this example in the API tutorial for more information.
0
Please sign in to leave a comment.
Comments
1 comment