<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: When i upload images to Nuxeo, there is no preview in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/when-i-upload-images-to-nuxeo-there-is-no-preview/m-p/322959#M9960</link>
    <description>&lt;P&gt;Please answer&lt;/P&gt;</description>
    <pubDate>Thu, 05 Mar 2020 11:48:01 GMT</pubDate>
    <dc:creator>Rahul_Mittal</dc:creator>
    <dc:date>2020-03-05T11:48:01Z</dc:date>
    <item>
      <title>When i upload images to Nuxeo, there is no preview</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/when-i-upload-images-to-nuxeo-there-is-no-preview/m-p/322958#M9959</link>
      <description>&lt;P&gt;Hi
As the creation of document is 3 step process.
I am having two different apis-   Batch Creation and Create metadata(document) ------&amp;gt; Wrapper on nuxeo created with spring rest template
and uploading image in 2nd step directly to nuxeo with out wrapper------&amp;gt;working fine.&lt;/P&gt;
&lt;P&gt;I am also having another api which does all 3 steps in one method in wrapper java sdk
But then the image is not visible.  and getting   "picture:info": {
"colorSpace": null,
"depth": null,
"width": null,
"format": null,
"height": null
},  in response&lt;/P&gt;
&lt;P&gt;For reference attaching two responses  and code for uploading image:-
//sending file as form data using postman
public HttpResponse upload(String url, String fileName, String caseId, MultipartFile file, String batchId,
int index, HttpHeaders headers) {
File tmpFile = null;
try {
HttpClient httpclient = HttpClientBuilder.create().build();
HttpPost httppost = new HttpPost(url);
for (Map.Entry&amp;lt;String, List&lt;STRING&gt;&amp;gt; header : headers.entrySet()) {
if (header.getKey().equalsIgnoreCase("Content-Length")) {
continue;
}
httppost.setHeader(header.getKey(), header.getValue().get(0));
}
httppost.setHeader(DmsConstants.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE);
//Writing multi-part file in temporary file
tmpFile = new File(fileName + "&lt;EM&gt;" + caseId + "&lt;/EM&gt;" + UUID.randomUUID().toString()); //UUID added so two requests do not over-write same file
file.transferTo(tmpFile);
httppost.setHeader(DmsConstants.X_FILE_NAME, tmpFile.getName());
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
builder.addBinaryBody("file", tmpFile, ContentType.DEFAULT_BINARY, tmpFile.getName());
//
HttpEntity entity = builder.build();
httppost.setEntity(entity);
// execute the request
HttpResponse response = httpclient.execute(httppost);
LOGGER.info("response from upload file: {}", response);
return response;
}&lt;/STRING&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Feb 2020 19:12:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/when-i-upload-images-to-nuxeo-there-is-no-preview/m-p/322958#M9959</guid>
      <dc:creator>Rahul_Mittal</dc:creator>
      <dc:date>2020-02-29T19:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: When i upload images to Nuxeo, there is no preview</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/when-i-upload-images-to-nuxeo-there-is-no-preview/m-p/322959#M9960</link>
      <description>&lt;P&gt;Please answer&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 11:48:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/when-i-upload-images-to-nuxeo-there-is-no-preview/m-p/322959#M9960</guid>
      <dc:creator>Rahul_Mittal</dc:creator>
      <dc:date>2020-03-05T11:48:01Z</dc:date>
    </item>
  </channel>
</rss>

