diff --git a/plugins/edu.msu.nscl.olog.api/src/edu/msu/nscl/olog/api/OlogClientImpl.java b/plugins/edu.msu.nscl.olog.api/src/edu/msu/nscl/olog/api/OlogClientImpl.java index 4390f4b5aa..ad3547eaf9 100644 --- a/plugins/edu.msu.nscl.olog.api/src/edu/msu/nscl/olog/api/OlogClientImpl.java +++ b/plugins/edu.msu.nscl.olog.api/src/edu/msu/nscl/olog/api/OlogClientImpl.java @@ -823,14 +823,19 @@ public Log call() throws Exception { @Override public Attachment add(File local, Long logId) throws OlogException { - FormDataMultiPart form = new FormDataMultiPart(); - form.bodyPart(new FileDataBodyPart("file", local)); - XmlAttachment xmlAttachment = service.path("attachments") - .path(logId.toString()).type(MediaType.MULTIPART_FORM_DATA) - .accept(MediaType.APPLICATION_XML) - .post(XmlAttachment.class, form); - - return new Attachment(xmlAttachment); + return wrappedSubmit(new Callable() { + @Override + public Attachment call() throws Exception { + FormDataMultiPart form = new FormDataMultiPart(); + form.bodyPart(new FileDataBodyPart("file", local)); + XmlAttachment xmlAttachment = service.path("attachments") + .path(logId.toString()).type(MediaType.MULTIPART_FORM_DATA) + .accept(MediaType.APPLICATION_XML) + .post(XmlAttachment.class, form); + + return new Attachment(xmlAttachment); + } + }); } @Override