AnsweredAssumed Answered

Can cmis atom binding generate a thumbnail, just like webservices?

Question asked by alfresco-jan on Nov 12, 2014
Latest reply on Nov 21, 2014 by jpotts
I successfully used the webpreview (cmis:thumbnail rendition) with Alfresco 4.2.c

To connect my cmis client with the repository, I used this URL:

http://localhost:8080/alfresco/service/cmis

Now I upgrade to Alfresco 4.2f and I tried the "more or less" new atom-binding with this URL:

http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom

Now I get "only" a downloadable link for my content and not a preview thumbnail.

If I switch back to the old URL, everything works fine, but I cannot use the "newer" features implemented in the CMIS-API ;-(.

Is there a way to get thumbnails as a preview with the new interface?
Nevertheless I also like some advice to dig deeper into the query.
Maybe a good way to debug this would be to just query cmis via curl.



Here are the different output-urls I get for my query:

old URL (alfresco/service/cmis): <b> WORKING! </b>



http://localhost:8080/alfresco/service/cmis/s/workspace:SpacesStore/i/bda076b2-1d20-4121-81d2-423d71ea9084/content.pdf?streamId=workspace://SpacesStore/9742cf09-80de-488f-a348-3f9014ee5716


new URL (alfresco/api/-default-/public/cmis/versions/1.0/atom)  <b> NOT WORKING! </b>

http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom/content/SomeNme%20201400174.pdf?id=bda076b2-1d20-4121-81d2-423d71ea9084%3B1.0&?streamId=9742cf09-80de-488f-a348-3f9014ee5716


If I dump all available renditions, I also see different renditionDocumentId(s):


http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom

          'c8a32a3e-acad-44b9-8f73-0496f49cf341' => {
                                                    'kind' => 'alf:webpreview',
                                                    'length' => '69675',
                                                    'renditionDocumentId' => 'c8a32a3e-acad-44b9-8f73-0496f49cf341',
                                                    'title' => 'webpreview',
                                                    'mimetype' => 'application/x-shockwave-flash',
                                                    'streamId' => 'c8a32a3e-acad-44b9-8f73-0496f49cf341'
                                                  },
          '9742cf09-80de-488f-a348-3f9014ee5716' => {
                                                    'width' => '100',
                                                    'renditionDocumentId' => '9742cf09-80de-488f-a348-3f9014ee5716',
                                                    'height' => '100',
                                                    'length' => '35368',
                                                    'kind' => 'cmis:thumbnail',
                                                    'title' => 'doclib',
                                                    'streamId' => '9742cf09-80de-488f-a348-3f9014ee5716',
                                                    'mimetype' => 'image/png'
                                                  }



http://localhost:8080/alfresco/service/cmis

{
          'alf:icon32' => {
                          'width' => '32',
                          'kind' => 'alf:icon32',
                          'length' => '-1',
                          'height' => '32',
                          'mimetype' => 'image/gif',
                          'streamId' => 'alf:icon32'
                        },
          'workspace://SpacesStore/c8a32a3e-acad-44b9-8f73-0496f49cf341' => {
                                                                            'kind' => 'alf:webpreview',
                                                                            'length' => '69675',
                                                                            'title' => 'webpreview',
                                                                            'mimetype' => 'application/x-shockwave-flash',
                                                                            'streamId' => 'workspace://SpacesStore/c8a32a3e-acad-44b9-8f73-0496f49cf341'
                                                                          },
          'alf:icon16' => {
                          'width' => '16',
                          'kind' => 'alf:icon16',
                          'length' => '-1',
                          'height' => '16',
                          'mimetype' => 'image/gif',
                          'streamId' => 'alf:icon16'
                        },
          'workspace://SpacesStore/9742cf09-80de-488f-a348-3f9014ee5716' => {
                                                                            'width' => '100',
                                                                            'kind' => 'cmis:thumbnail',
                                                                            'length' => '35368',
                                                                            'title' => 'doclib',
                                                                            'height' => '100',
                                                                            'mimetype' => 'image/png',
                                                                            'streamId' => 'workspace://SpacesStore/9742cf09-80de-488f-a348-3f9014ee5716'
                                                                          }
        }


Perhaps some deeper insight into this would be great. I am wondering why the different bindings (URL) give different results …

Outcomes