AnsweredAssumed Answered

Creating and Retrieving thumbnails for documents

Question asked by arpit.gupta on Feb 6, 2012
Latest reply on Feb 7, 2012 by jpfi
Hello Friends,

I want to create thumbnails for new documents uploaded in alfresco.
I am uploading documents using web scripts. I have added code for creating thumbnails in my upload script.

Some code from script…


  upload = companyhome.createFile("upload" + companyhome.children.length + "_" + filename) ;
  upload.properties.content.write(content);
  upload.properties.content.mimetype = "UTF-8";
  upload.properties.title = title;
  upload.specializeType("propco:documents");
  upload.properties.description = description;
  upload.save();
  upload.createThumbnail("thumbnailPreview", true);


Now when i try to access thumbnail using a GET call
http://127.0.0.1:9090/alfresco/service/api/node/workspace/SpacesStore/c01183a5-a120-45a4-8882-9f36374b7850/content/thumbnails/thumbnailPreview?c=queue&ph=true

i got an exception that  " The thumbnail name 'thumbnailPreview' is not registered ".

I am sure i am missing something. But i am unable to figure it out.
So can someone please help me in this…

Thanks,
Arpit

Outcomes