<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Could somebody confirm that the smart service HTTP File Upload uses by default a</title><link>https://community.appian.com/discussions/f/process/5033/could-somebody-confirm-that-the-smart-service-http-file-upload-uses-by-default-a</link><description>Could somebody confirm that the smart service HTTP File Upload uses by default as the content type of POST requests &amp;quot;multipart/form-data&amp;quot;? If that is so, how could I change the content-type to &amp;quot;application/x-www-form-urlencoded&amp;quot;? Passing it as a part</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Could somebody confirm that the smart service HTTP File Upload uses by default a</title><link>https://community.appian.com/thread/18517?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 23:14:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e5d8cee5-537c-4eac-aaf0-f87a9c5a27b7</guid><dc:creator>Stefan Helzle</dc:creator><description>Check &lt;a href="http://www.huyng.com/posts/under-the-hood-an-http-request-with-multipartform-data/"&gt;www.huyng.com/.../&lt;/a&gt; for how a correct request has to look. Appian does it the right way. Any chance you can modify the server side. If not you need to write an Appian plugin.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Could somebody confirm that the smart service HTTP File Upload uses by default a</title><link>https://community.appian.com/thread/18515?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 22:58:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c6c06a03-69a5-4983-8478-ceaa990b945f</guid><dc:creator>orlandom</dc:creator><description>I am still not clear on what my problem is. What I think is that the server handler takes everything written on the request body as the contents of the file so I end up with header information on the uploaded file and thus it is corrupted. Since the handler takes all the required parameters from the URI, I do not need to write anything on the request body besides the file bytes. But the smart service does not give me this flexibility, it appears, which of course I have with pure Java code.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Could somebody confirm that the smart service HTTP File Upload uses by default a</title><link>https://community.appian.com/thread/18495?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 20:02:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3020c22c-6846-4d79-b03b-700644025cef</guid><dc:creator>Stefan Helzle</dc:creator><description>So your problem is that the server you try to send the file to does not accept this content-type?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Could somebody confirm that the smart service HTTP File Upload uses by default a</title><link>https://community.appian.com/thread/18493?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 19:57:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3742e0cd-1d02-48d0-a653-13d5e3ac311b</guid><dc:creator>orlandom</dc:creator><description>Right. Could I then pass an empty value using the smart service? My problem seems to be linked to the content type being &amp;quot;multipart/form-data&amp;quot; by default.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Could somebody confirm that the smart service HTTP File Upload uses by default a</title><link>https://community.appian.com/thread/18491?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 19:38:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:008da714-40a2-4467-80a9-914206d263ed</guid><dc:creator>Stefan Helzle</dc:creator><description>is not allowed to be long enough by the specification.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Could somebody confirm that the smart service HTTP File Upload uses by default a</title><link>https://community.appian.com/thread/18490?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 19:38:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:31c6eb46-37cd-4e0d-9940-c646ca0ea842</guid><dc:creator>Stefan Helzle</dc:creator><description>AFAIK you cannot upload a file URL encoded. This would mean to put the file content into the URL which.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Could somebody confirm that the smart service HTTP File Upload uses by default a</title><link>https://community.appian.com/thread/18489?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 19:24:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c57165f4-7ebc-4c60-9ced-b9e056729f48</guid><dc:creator>orlandom</dc:creator><description>... PrintWriter(new OutputStreamWriter(con.getOutputStream(),  &amp;quot;UTF-8&amp;quot;));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;        Files.copy(fileToUpload.toPath(), con.getOutputStream());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;con.getOutputStream().flush(); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wr.append(CRLF).flush(); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wr.close();&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>