Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

Alois H.2's avatar
Alois H.2
New member | Level 1
9 years ago

How i can get only images from dropbox in iOS app?

Is there any property of DBMetaData that I can use to load images only.

My Logic : 

  if fileMetaData.isDirectory

            {

                 self.restClient.loadMetadata(fileMetaData.path)

            }

            else

if    fileMetaData.isOfImageType         {

            self.restClient.loadFile("\((tempFile as! DBMetadata).path)", intoPath: localPath)

            }

 

2 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago

    It looks like you're using the iOS Core SDK. No, the DBMetadata object in that doesn't offer anything quite like that. You can pull the file extension off of the file name though and compare that to a list of image file extensions you're interested in though.

    (Also, I should note that the iOS Core SDK uses API v1, which is deprecated.)

About Dropbox API Support and Feedback

Node avatar for Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!