iOS dropbox SDK loading thumbnails and number of files inside a folder -
hi developing application brings entire folder , file structure content management system have done box , sharepoint integration. looking sync dropbox now. in dbmetadata class have properties
bool thumbnailexists; nsarray* contents; nsstring* icon;
first thing want here want load thumbnails of files, not 1 thing icon property returns string, 'page_white_acrobat' (i thought return url or download thubmnail). there way bring thumbnails using dropbox sdk. uploaded .mp4 file , .png file, show thumbnails when open dropbox in chrome in sdk thumbnailexists property returns no.
second want number of sub folders , files folder, tried accessing contents property of folder dbmetadata object , returned nil. there way in sdk count number of files inside folder or work around.
it seems dropbox provides name of icon use. can't download it, should check string , use resources in app bundle.
the contents of dbmetadata object null until make request load metadata @ path.
this code started subdirectories.
-(void)restclient:(dbrestclient *)client loadedmetadata:(dbmetadata *)metadata { // load metadata of subdirectories (dbmetadata *node in metadata.contents) { if (node.isdirectory) { [_restclient loadmetadata: node.path]; } } // count of directory contents if (metadata.isdirectory) { nslog(@"%@ contains %d files , folders", metadata.path, metadata.contents.count); } }
Comments
Post a Comment