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.

 
Kreator01
Kreator01's picture

Joined: 2013-05-07
Posts: 12
Posted: Mon, 2013-05-13 07:37

so would I

 
stu2000

Joined: 2013-05-09
Posts: 4
Posted: Mon, 2013-05-13 14:02

Plus 1

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Mon, 2013-05-20 02:04

Started on this module and almost finished...

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]

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2013-05-21 19:08

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

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Mon, 2013-05-27 21:25

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

 
blackhole86

Joined: 2010-08-06
Posts: 16
Posted: Tue, 2013-05-28 11:14

Thank you!
I will test it now.

 
blackhole86

Joined: 2010-08-06
Posts: 16
Posted: Tue, 2013-05-28 11:46

It works perfectly, but I think that would be appropriate to have a loading bar when uploading images.

 
blackhole86

Joined: 2010-08-06
Posts: 16
Posted: Tue, 2013-05-28 13:05

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.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2013-05-28 13:16

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.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2013-05-28 18:51

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 below

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2013-05-28 18:57

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...

 
blackhole86

Joined: 2010-08-06
Posts: 16
Posted: Thu, 2013-05-30 23:15

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

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Thu, 2013-05-30 23:25

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)

 
blackhole86

Joined: 2010-08-06
Posts: 16
Posted: Tue, 2013-06-04 16:01

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.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2013-06-04 16:21

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.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2013-06-04 21:52

Try this version... dropboxdl

Should be good to go, I tested on Safari, IE, FF, Opera (all latest vers)

 
blackhole86

Joined: 2010-08-06
Posts: 16
Posted: Sat, 2013-06-15 10:40

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.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Sat, 2013-06-15 15:18

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.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Sun, 2013-06-16 00:29

Working fine on my end, from three different locations, three different websites (api keys), and three different dropbox accounts.

 
blackhole86

Joined: 2010-08-06
Posts: 16
Posted: Fri, 2013-06-21 10:50

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.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Sat, 2013-06-22 04:12

You can grab the old one(s) from this link

I can't reproduce your error.

 
blackhole86

Joined: 2010-08-06
Posts: 16
Posted: Sun, 2013-06-23 12:18

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.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Mon, 2013-06-24 01:41

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.

 
tphoward

Joined: 2013-08-19
Posts: 1
Posted: Mon, 2013-08-19 19:27

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.

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Sun, 2013-08-25 01:47

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.