Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
ramonpoca
9 years agoExplorer | Level 4
listFolder with includeMediaInfo not listing all available files
We have a problem while integrating the v2 iOS API on our photography App.
If we call listFolder for the root folder with includeMediaInfo set to yes, fewer results are returned (e.g. recently batch uploaded photos are not included in the response).
If we set includeMediaInfo:@NO, all files are listed.
26 Replies
Replies have been turned off for this discussion
- Individual IT S9 years agoHelpful | Level 5
have a posted a simmilar problem here: https://www.dropboxforum.com/t5/API-support/new-files-not-returned-by-files-list-folder/m-p/224988#M12174
and now reading your post I tried changing my code and it does work. The API does return all new and old files correctly.
I would say that is a problem in the API.
- Greg-DB9 years ago
Dropbox Community Moderator
When using includeMediaInfo, there can be a delay on results being returned while the media information is prepared.
They will get listed once the information is available, but this can take a variable amount of time, especially if there are many files or a lot of activity in the account. - Individual IT S9 years agoHelpful | Level 5"variable amount of time"
is that minutes or hours?
I've tested on 2 accounts with basically no activity. - Greg-DB9 years ago
Dropbox Community Moderator
For most users most of the time, it's on the scale of seconds or minutes, but it can be longer sometimes, on the scale of hours.
In some cases, backend issues on our side can also slow this down. - Individual IT S9 years agoHelpful | Level 5just tested again. Files that were placed into the folder yesterday 'server_modified' => string '2017-06-09T16:48:56Z' are still now showing up with "include_media_info" => true but all is fine if setting "include_media_info" => false
- De L.19 years agoCollaborator | Level 9
I have the exact same issue here with files not showing up after a hour or more. However, I also have this problem with the folders that contain the media files.
If I create a new folder on Dropbox, the folder will immediately show up when I do a /listFolder call with includeMediaInfo on the parent folder. However, when I upload a media file to the new folder, the folder suddenly disappears from the reponse when doing the same API call.
That is a little bit strange, as the folder itself will never have any media information... I hope that this is a bug and not the expected behavior! I would like to see the folder entries at all time when doing a includeMediaInfo call.
Furthermore, it would be nice to list the files via the /listFolder call as well even if the don't have the media information yet. I would expect to have the same kind of FileMetadata response as when doing a /get_metadata on an entry that doesn't have the media info yet. By the way, what does the pending attribute actually do in the MediaInfo object? Isn't that supposed to be set and used in this case?
- Greg-DB9 years ago
Dropbox Community Moderator
For reference, the 'pending' state is used when metadata is directly requested for a file for which the media metadata is not yet available, such as when using /files/get_metadata, but not from /files/list_folder.
If you're seeing significant delays like this when using include_media_info=true, please open an API ticket with the affected user ID(s) so we can look into it:
https://www.dropbox.com/developers/contact
Thanks in advance! - De L.19 years agoCollaborator | Level 9
I just tried it, but doing a call to /files/get_metadata with include_media_info = true to a file which doesn't have mediametadata yet available doesn't return a mediadata object at all. So pending isn't set in that case.
I am also currious why the /files/get_metadata call and the results of /file/list_folder don't return the same FileMetadata object for the file which doesn't have mediametadata yet. Could you explain why that is the case?
And what about the issue of not showing folders when doing a /files/list_folder call with include_media_info = true?
- cdemiris999 years agoExplorer | Level 3
Second the question about why files aren't returned if they haven't been processed yet. Seems like they should be returned without the additional metadata until the metadata is ready. Files seem to be taking a lot longer to process. Just tried a small 4MB mp4 file, and an hour later it's still not appearing. We're starting to get customer complaints about their files not showing up.
- Greg-DB9 years ago
Dropbox Community Moderator
If you're using /files/get_metadata with include_media_info=true, you should get 'pending' media information. I just tried it, and it is working for me. Can you share the HTTP request and response for an API call like that that isn't working for you? Thanks in advance!
Also, the API is designed to show pending media info from /files/get_metadata but not /files/list_folder. The former can be accessed on demand, but the latter is only supposed to return one entry per file, so they are deferred until all of the requested (media) information is available. I'll send this along as a feedback though, to see if we can do this in a different way in the future.
In any case, the delayed files/folders appear to be due to an issue on our side. We're looking into it, and will follow up here one we have an update.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!