Questions Tagged With filehttps://answers.axonivy.com/tags/file/?type=rss&user=SupportIvyTeamquestions tagged <span class="tag">file</span>enThu, 18 Apr 2019 04:05:19 -0400How to upload a File to a REST apihttps://answers.axonivy.com/questions/3777/how-to-upload-a-file-to-a-rest-api<p>I am building a document management service with a RESTful API. </p> <pre><code>@Path("fileUpload") public class FileUploadService { @PUT @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.MULTIPART_FORM_DATA) public Response uploadFile(@FormDataParam("file") InputStream fileStream, @FormDataParam("file") FormDataContentDisposition fileDetail) throws IOException { .... } } </code></pre> <p>It seems to work as expected if I use a third party client such as Postman. However, when using the REST activity of ivy I am unable to call this service. I always get errors stating the the header <code>X-Requested-By</code> is missing. Whats the issue? How can I send files using a REST Client Call activity?</p>SupportIvyTeamThu, 18 Apr 2019 04:05:19 -0400https://answers.axonivy.com/questions/3777/how-to-upload-a-file-to-a-rest-apifileuploadrestfile