dropbox middleware implementation