Dropbox File Picker
I thought now that there's no Open in... anymore, I'd build a little UI/script to get files from Dropbox into Pythonista more easily:
It's pretty basic – once you've completed the setup (you need to configure some things in the Dropbox Dev Center), you'll get a list of folders and files in your Dropbox. You can drill down the folder hierarchy and download files one at a time. They're saved to the root folder of the Pythonista script library; if a file with the same name already exists, a numeric suffix is appended automatically. The UI could be prettier, but it gets the job done.
I added the console.set_idle_timer_disabled(True) and it did not help. I find that it can hang during the download or the upload process (more likely the latter) but it is as if Dropbox just stops responding for some reason.
Plug your iOS device into a power supply and let the sync run overnight.
I think I may have found the problem. DropboxSync does not seem to run (reliably) on an iPad mini 1. I ran it on an iPad 3 and it never paused and ran to completion the first time. Maybe the iPad mini is not fast enough to keep up with the Dropbox protocol? If so, perhaps the script could be altered to operate with a slower processor.
Hi, thanks for this. I have done everything and the script works fine and opens dropbox folder and etc. my only problem is that the pop up window is a tiny rectangle. How to fix this? (Using latest beta)
If you have the latest beta you shouldn't need this as there should be a cloud file picker in the dialogs module.
@lkred - here is how if fixed the tiny box issue ...
class DropboxView (ui.View): def __init__(self, path='/', height=400, width=400): tv = ui.TableView() self.frame = (0,0,width,height) tv.frame = self.frame self.flex = 'WH' tv.flex = self.flex o o o w, h = ui.get_screen_size() root_view = DropboxView(width=w/2,height=h/2) root_view.present('sheet') root_view.load_folder()
I made these changes to the Dropbox Picker but I am getting an error:
TypeError init() got an unexpected keyword argument 'width' on the 3rd to last line.
Where did I go wrong?
NM, I figured it out.
File picker throws error about wrong token although it’s 100% OK and previously everything worked fine.
Is it just me?
PS It seems that Dropbox API v1 is completely deprecated. Is there any options to use v2 API?
if you search the forums for dropbox api v2, or anything dropbox related in the last 6 months or so,myou should find several options that replace the depreciated dropbox module.