Adding Marina as a watcher (Don't know if there is another Files API, Repository guru).
The following patch resolves the Dropbox problem in a dirty-not-to-use way but I'd like to use that as a start to find the best solution. Looking at sync_external_file(), which is not used apart from one local repository, I was wondering where we should store the information retrieved from the repositories. The files table should contain more fields imo. When we look at the Dropbox repository, we're able to get the revision number from the file, which is great to check if we have the file or not, instead of checking the modification date.
Using the revision number in the reference would do the trick for Dropbox as it serializes more than one field, but what about other ones which only provide a URL? What would be the best approach to get external information such as revision/modification date in the get_file_by_reference if they're not included in the reference? When should we ideally run the sync_external_file() function?
Thanks for your feedback.
(This patch fixes a bug in Oauth which crashes when executing a second request, it apparently also crashes when setting arguments to the request)