Module: Dropbox Upload *** Not yet released - testing only ***
blackhole86
Joined: 2010-08-06
Posts: 16 |
Posted: Thu, 2012-11-01 17:06 |
EDIT: Module is in the following post: jnash Hello, Someone could develop a module to load content from dropbox? I think that it would be an interesting feature for many people. |
|
Posts: 12
so would I
Posts: 4
Plus 1
Posts: 814
Started on thismoduleand almostfinished...Couple of gotcha's though:
1) You will have to sign up for an API key from dropbox (easy to do)
2) It will only be a sidebar block (shown below)3) It's not as graceful as I'd like, but it works!
Hope to have it done soon - don't ask for an ETA please... I'll get 'er done when I can...[img]http://codex.galleryproject.org/images/4/49/Db_dl_1.jpg[/img]
[img]http://codex.galleryproject.org/images/d/d5/Db_dl_2.jpg[/img]
[img]http://codex.galleryproject.org/images/a/af/Db_dl_3.jpg[/img]
Posts: 814
Would like to test with someone else, let me know if you're interested... it's a little bit of editing some php for the moment though
Posts: 814
Okay, ready for testing. Let me know how/if it works for you:
If it blows up your gallery, or causes your freezer to stop working, or any other ailment, it's not my fault
Test DropboxDL Module
Posts: 16
Thank you!
I will test it now.
Posts: 16
It works perfectly, but I think that would be appropriate to have a loading bar when uploading images.
Posts: 16
This could be a big problem:
In a shared hosting environment this plugin can cause a Timeout exception. Usually, in a shared hosting there is a restricted limit for execution of php script. In my hosting, for example, this limit is setted to 120 seconds. When a user try to upload multiple files, this script cause a Timeout Exception.
Posts: 814
Yes, agree with what you've asked. Unfortunately, using the dropbox chooser, there isn't a lot of configuration that can be made. The 'loading' bar would be nice, but it doesn't provide that flexibility. I also can't set a limit on the selected files. I -could- make it so you could only select one item, but I think that limits the functionality for those who don't have the timing limit.
I'm open to ideas on providing a 'uploading' bar however, as I think it could be implemented after the dropbox returns to gallery, but not too sure as that part happens really quickly - on my side at least.
Posts: 814
Okay, did some modifications to make it more 'visually' alerting/appealing...
No more sidebar!
Now adds a link in Add menu for Dropbox Add
Also, has a Images uploading spinner
See how that works out...
dropboxdl
Can't do anything about the timing out issue for hosts that limit execution...EDIT: see belowPosts: 814
I was thinking of modifying the upload to use the task function (like server_add) but I think this would be more confusing...
Let me know what you think... If I added this, the uploads would become a task, and if timed out, could be continued via the maintenance/tasks menu...
Posts: 16
I can't upload photos with the new version. When I select photos from dropbox, the button "upload" don't appear. Into the form remain the "choose from dropbox" button
Posts: 814
the 'Upload Selected Items' button doesn't show up next to the 'Cancel' button? It looks a bit different than before.
It works on all the browsers I tried... (IE, FF, Chrome, Safari)
Posts: 16
This is a screenshot.
I have selected some photos from my dropbox account, then I clicked on choose button. As you can see, there isn't upload button. I use FF.
Posts: 814
I'll have to take a look... Might be because the label of the button being changed by language. I'll have a look a bit later and get it corrected. Traveling at the moment.
Posts: 814
Try this version... dropboxdl
Should be good to go, I tested on Safari, IE, FF, Opera (all latest vers)
Posts: 16
Hello,
now I find another problem: when I click on the choose button, the popup shows this {"error": "Invalid app_key"}.
This because the url has the field "app_key=undefined". This is the URL: "https://www.dropbox.com/chooser?origin=http://mydomain.com&app_key=undefined".
I have inserted correctly the Api Key in the admin page.
I also checked in page code and the script shows the correct api key(<script type="text/javascript" src="https://www.dropbox.com/static/api/1/dropins.js" id="dropboxjs" data-app-key="xxxx"></script>).
I tried to uninstall and reinstall the plugin, but the error persists.
Posts: 814
That's a dropbox error. I can't do anything about that. Mine is working fine, and, like you said, the key is in there. I'll take a deeper look, perhaps they are deploying a new version or something, and it just hasn't made it's way to me yet.
Posts: 814
Working fine on my end, from three different locations, three different websites (api keys), and three different dropbox accounts.
Posts: 16
I don't understand why on my installation not works.
I tried again to unistall and reinstall the module, and I also created a new dropbox app. Any other suggestion?
Please can you repost the previous version of module? I would understand if is a problem of my installation. The previous version worked correctly.
Posts: 814
You can grab the old one(s) from this link
I can't reproduce your error.
Posts: 16
I think I understand a part of the problem:
The previous versions of plugin have a block on the sidebar. When this block is active, the plugin works correctly. The version 4 don't have this block and the plugin don't work.
I tried to add the code of this block on v4 (in helpers and views folder). With this trick the "invalid app key" error disappear and I can connect with my dropbox account.
Posts: 814
Hmmm... I'm not able to reproduce the issue you're having with v4. I've tried on three different sites, and all work, and all show the app_key correctly in the page source, and when choose is clicked.
I don't see why moving the code to the sideblock would make any difference for you, especially since the view page is pretty much the same.
Posts: 1
A new user here...this is a very helpful module.
I've tested with both v3 and v4, currently using .Pear Theme. With the sidebar visible dropboxdl works correctly. With the sidebar hidden, it fails, passing "undefined" as the apikey.
Posts: 814
I think with the Pear Theme, the modules are not used, I'm not sure if I can correct this or not, but I'll look in to it.