cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Video thumbnails are not generated anymore

Video thumbnails are not generated anymore

Sergey S.10
New member | Level 1

Some days ago we found that video thumbnails are not displayed in our app. iOS app uses official cocoapod Dropbox-iOS-SDK (version 1.3.13). At some step it displays media content of user's Dropbox folders: images and videos. We get and display thumbnails for images and videos using method

-loadThumbnail:ofSize:intoPath

During last several months it worked for both videos and images, but some days ago it logs warning and return error in callback for videos:

[WARNING] DropboxSDK: error making request to /1/thumbnails/dropbox/camera uploads/.../X.mov - (415) permanent failure - this image isn't supported by thumbnailing

I understand that SDK officially should support only some image file types for files less than 20Mb. I don't understand why you turned this feature off for other file types: it was implemented and it worked well.

Please turn this feature on and officially declare this support in documentation. I can't imagine that the most famous cloud service SDK doesn't support thumbs for videos. How we should display these videos in our apps?

22 Replies 22

Greg-DB
Dropbox Staff

Thanks for writing this up! That's correct, the API doesn't currently officially support video thumbnails, so I'm sending this along as a feature request.

James K.36
New member | Level 1

Hi Gregory.

Can you please help provide some additional context around this. We have an app that was recently feature by Apple as one the the "Best New Apps" and our integration with Dropbox is a major feature for our users. It gave them easy and quick access to their media on Dropbox, including videos. 

Up until recently, these users could easily browse their Dropbox files and easily select the media they wanted because all videos and images returns thumbnails. Now, they have no visibility into the files they are browsing. 

This is obviously a challenge for us and the users that we share. Adding to the confusion is that through the native Dropbox app, thumbnails continue to be returned for all images and videos. 

Thanks in advance for your additional comments on this issue. 

James Kupernik
Solutions Architect
VidMob, Inc. 

Greg-DB
Dropbox Staff

Hi James, unfortunately I don't have any additional information on this right now. I'll send this along to the team though.

Ken E.4
Dropbox Staff

Hi Sergey & James,

We believe the issue has been resolved. Could you let us know if you're still seeing this regression?

James K.36
New member | Level 1

Hi Ken

i just tested via the VidMob app and still seeing the same result of no thumbnails being returned for video files. 

Thanks,

 

James

Greg-DB
Dropbox Staff

Hi James, thanks for checking that. Can you share the relevant code snippet to reproduce this, so we can make sure we're addressing this properly? Thanks in advance! 

James K.36
New member | Level 1

Hi Gregory

Our iOS developer is out until tomorrow, but I believe this is the section of code being called. 

PerformSync(^{

            [DropBlocks loadThumbnail:self.metadata.path

                               ofSize:imageSize

                             intoPath:localPath

                      completionBlock:^(DBMetadata *metadata, NSError *error)

             {

                 completionBlock([UIImage imageWithContentsOfFile:localPath]);

             }];

        });

Thanks!

Greg-DB
Dropbox Staff

Thanks! We're looking into it. If you can also share some sample values for self.metadata.path and imageSize though, that may also be helpful, just to make sure we're reproducing this exactly the same way.

James K.36
New member | Level 1

Gregory 

If this next snippet doesn't make sense, i'll have to wait for Sergey to weigh in tomorrow, but here is the method in the Dropbox-iOS-SDK-Source that is being called. 

 

- (void)loadThumbnail:(NSString *)path ofSize:(NSString *)size intoPath:(NSString *)destinationPath 

{

    NSString* fullPath = [NSString stringWithFormat:@"/thumbnails/%@%@", root, path];

    

    NSString* format = @"JPEG";

    if ([path length] > 4) {

        NSString* extension = [[path substringFromIndex:[path length] - 4] uppercaseString];

        if ([[NSSet setWithObjects:@".PNG", @".GIF", nil] containsObject:extension]) {

            format = @"PNG";

        }

    }

    

    NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObject:format forKey:@"format"];

    if(size) {

        [params setObject:size forKey:@"size"];

    }

    

    NSURLRequest* urlRequest = 

        [self requestWithHost:kDBDropboxAPIContentHost path:fullPath parameters:params];

 

    DBRequest* request = 

        [[[DBRequest alloc] 

          initWithURLRequest:urlRequest andInformTarget:self selector:@selector(requestDidLoadThumbnail:)]

         autorelease];

 

    request.resultFilename = destinationPath;

    request.userInfo = [NSDictionary dictionaryWithObjectsAndKeys:

            root, @"root", 

            path, @"path", 

            destinationPath, @"destinationPath", 

            size, @"size", nil];

    [imageLoadRequests setObject:request forKey:[self thumbnailKeyForPath:path size:size]];

}

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    James K.36 New member | Level 1
What do Dropbox user levels mean?