AnsweredAssumed Answered

Thumbnail API

Question asked by rjohnson on Mar 27, 2012
Latest reply on Mar 29, 2012 by amandaluniz_z
The thumbnail API seems to be either incomplete or incorrectly documented. Several of the functions that are supposed to exist cannot be found when executing javascript in Javascript Console (I do not know if this could make a difference or not - but it never has with anything else).

By way of example

var document = space.childByNamePath("doc000000011.xml");
logger.log(document);
var tList = document.getThumbnails();
for (var t in tList) {
  logger.log(t);
}
Works, but the iteration over tList prints out

0
1
2
Which I honestly would not have expected. However, by contrast

var document = space.childByNamePath("doc000000011.xml");
var tdList = document.getThumbnailDefinitions();
for (var td in tdList) {
  logger.log(td);
}
logger.log("Done getThumbnailDefinitions");
Throws an error that
function getThumbnailDefinitions cannot be found
Further

var document = space.childByNamePath("doc000000011.xml");
logger.log(document);
var tList = document.getThumbnails();
for (var t in tList) {
  t.update()
  logger.log(t);
}
logger.log("Done getThumbnails");
Throws an error that
function update cannot be found

Both update and getThumbnailDefinitions are documented functions. The same is true if you try and use updateThumbnail().

Don't know why this is the case, perhaps I am doing something wrong.

Can anyone advise?

Thanks

Bob Johnson

Outcomes