I am using the Java Box SDK and I cannot retrieve the thumbnail of an image on my first request. An empty byte array is always returned for the first request. Subsequent requests for that file's thumbnail after waiting a short period (about 1 second) always work. Because that short delay after the first call is needed, I can't simply call getThumbnail() twice if the first request doesn't return anything.
Am I doing something wrong? Has anyone else experienced this?
public byte[] getThumbnail(String boxId){
BoxFile file = new BoxFile(this.api, boxId);
byte[] thumbnailBytes = file.getThumbnail(BoxFile.ThumbnailFileType.PNG, 32, 32, 32, 32);
return thumbnailBytes;
}