Pressbox integrates DropBox with your blog allowing you to post images and files directly from your DropBox. When looking for a good Dropbox plugin I found only very old plugins that haven’t been updated in a very long time. None of these plugins used the new Web API DropBox has provided which requires OAuth. To remedy this I made Pressbox.
Requirements
- PHP 5.2
- cURL
- WordPress 3.0
- Dropbox Account
Download
Description
The Pressbox plugin adds a new tab to the Media Upload screen that allows you to insert images and files from Dropbox into your posts.
Additionally, the plugin provides a new shortcode that lets you add links or display images anywhere you want on your blog.
This plugin is under heavy development so please feel free to send me feedback, bug reports, and feature requests!
Credits
This plugin bears a great debt to the work of Joe Doleson’s Wp To Twitter plugin for his excellent example of OAuth integration with WordPress.
Changelog
0.1
- Initial release.
Installation
- Upload the `pressbox` folder to your `/wp-content/plugins/` directory
- Activate the plugin using the `Plugins` menu in WordPress
- Go to Settings > Pressbox
- Adjust the Pressbox Options as you prefer them.
- Supply your DropBox Key and Secret, the settings page has detailed instructions on how to get these.
- Start using Pressbox!
Frequently Asked Questions
I can’t connect to DropBox using OAuth. What’s wrong?
Common problems are you don’t have cURL support or that your server time is incorrect. Check with your host to verify these possibilities.
Do I have to have a DropBox account to use this plugin?
Yes, you need an account with DropBox to use this plugin.
What if my server doesn’t support the methods you use to contact these other sites?
There is not much to be done about this except ask your provider to update. The plugin will check for requirements on activation and let you know if something is missing.
Screenshots

Pressbox uses Dropbox's new OAuth based Web API. No need to move all the files you want to use to the Public folder.

Pressbox can display image thumbnails, allow you to save favorite folders for easy navigation, and set a custom default folder.







Instead of using Curl, use WordPress HTTP API to ensure your plugin will work in maximum number of environments.
This should be fairly simple. The cURL stuff is confined to a single place in the plugin. Thanks for the heads up.
hello,
It will be very useful !
i’ve got this “Call to undefined function curl_init() in /home/silvyn/www/kehitys/blog/wp-content/plugins/pressbox/includes/pressbox-oauth.php on line 257″ after your seven steps done.
Is it linked with what Ashfame said ? I don’t know what is cURL or WordPress HTTP API.
thanks
Stéphane
Hi Stéphane, this will be fixed in the next version (due out shortly). Right now it needs Curl to work properly but using Ashfame’s suggestion of the WordPress HTTP API will fix that. You shouldn’t need to do anything but update.
Sorry!
Hello
When I click on “connect your blog to dropbox” I have a blank page.
Php5-curl on my ubuntu10.10 server is well installed.
ANy idea?
Do you have javascript turned on in your browser? To do the redirect it inserts a bit of javascript to move you to the next page. In the next version I’ll make it spit out a link so if javascript is off people can still click it.
Other then that it sounds like something might be crashing maybe. If you could turn on php errors messages briefly and see if you see any that would be extremely helpful.
Thanks for the feedback.
Javascript is well enabled on FF4.0. How to turn on the PHP errors messages? I think directly on the server ? something in the php.ini?
Worked, I Tink I didn’t restart apache when i’ve installed php5-curl…
it’s working, many thx
Thanks Pfff, sorry for the trouble!
Hey,
Very useful plugin – well done! It didn’t work out of the box for me with WP installed a few sub-dirs deep on my local server i.e. wordpress is in /client-name/project-name/
It seems to be due to how $pressbox_basedir was being calculated but I set
$pressbox_basedir = WP_PLUGIN_DIR . “/pressbox”;
in the various files and that seems to have sorted it. Once again, thanks for the plugin (you saved me heaps of work!).
Hi:
Downloaded this plugin and followed (I believe) all the directions but unable to get a picture in the post. I get a broken link icon. Any suggestions?
Thanks.
Robert
Hello.
Could you add features like alt tag, alignment, resizing image size or adding classname?
And if possble, I d’like to manage images from dpropbox by media library.
Thanks for your pressbox plugin.
@Robert// Do your image filename have a space?
Hey Les, great plug-in. I’m making a website for a photographer. She wants her clients to be able to type in a code which will direct them to a page of their photos, so they can pick and choose which they want to buy from there. I’m thinking Dropbox is going to be a good program to enable her to upload big folders. Could I configure Pressbox to be able to upload whole folders? Thanks!
Hi,
thanks for the great plugin!
Is it possible to add something like target=_blank to the shortcode or to define (and how) the ability a) to open it on the same window or b) download it;
Thanks, keep the nice work,
Nikos
Some time i really get wonder that how people write something so informative like the above details, i am really thanks full of you guys for sharing.Thanks Alot
Great tool. Worked the first try very nicely. This’ll make posting from iPhone/iPad/Mac MUCH more sane – especially in a shared Dropbox folder. I agree with Nikos that a target=_blank would be handy, but that’s about it.
Hi,
Handy plugin. Is there any way to have it so that you can download the file that it is linked to? Say if you were linking to a pdf or something?
That would be awesome!
Cheers aand Thanks.
Emily
Thanks a lot for the plugin !
It is one of the most useful things in my wordpress now !
A few notes though:
- Downloading and opening files in a new window would be very handy
- Plugin can’t go through directories with non-alphabetic characters in them (space, dot, colon, etc)
I’ll need to figure out why that is. Maybe Dropbox needs the directories encoded or something.
I’ll definietly be adding a target _blank option for new window opening, that’s a common feature request.
Would it be possible to add an entire folder to make like a photo gallery?
Hello Les,
Nice job dude. I got the plugin working. I join my voice to bigredthelogger with a feature request for galleries. It would be very useful to share photo sessions on wordpress.
I found a bug that should be an easy fix. When you click on an item and it adds the shortcode, there is a missing space.
[pressbox path=/Public/2.jpgtype=link] note the space missing between jpg and type
Thanks Bigred, I’ll get that pushed out.
sir, i is there any way a dropbox picture put as a featured image?an when i put grab a photo from dropbox it only shows a code in wordpress post..can you help me out?sorry im a noob for these things
Hi there,
would you please so kind and fix a problem for me?
by inserting a dropbox-archive-download-link into a post the archive filename is lost.
e.g.
[pressbox path=/Privat/Subfolder_1/blabla.zip type=link name=Archiv_1]
The filename will not be blabla.zip it appears pressbox.php.
A file called pressbox.php is downloaded.
after renaming it to blabla.zip everything is fine but….
anyway a very usefull plugin !
thank you in advance
greetings
Michael
Michael – I noticed that as well – here’s the fix –
after line 56 of pressbox.php, add this line:
header(‘Content-Disposition: attachment; filename=’ . ltrim($metadata->{‘path’},’/_’));
This will tell the browser to use the filename in the “path” parameter even though the link is still pointing to pressbox.php
Bryan
You rock ! – this will work fantastic for me.
Thanks a lot m8
Michael
Sorry for hammering again.
Is there a limitation by downloading a file in size.
Due to the fix from Bryan small zip file are no problem.
But a zip file in size 25 megabyte won´t work – why ?
File not found is the error…..
damn
I wanted to know if the ability to post the entire folder would be available. I would like to be able to post the entire folder instead of adding them one at a time. It would be a great feature. But, this plugin is a great time saver.
Will it allow me to upload an image from dropbox into the wordpress Media library? Could be useful for image uploading into wordpress from iPad.
Apparently the oAuth has changed…
Now, if i create a new app under a dropbox account and attempt to authenticate, I end up in my dropbox account with this message at the top: “This session has expired. Please return to the app to try again. ”
If I disconnect an existing application that has already requested a token and try to reauthorize, it works, though. I just can’t set up any new applications under a new account.
I’m having the same problem as described by Bryan Headrick.
Any idea how it can be fixed?
Apparently, Dropbox released an updated API on October 20th. I haven’t dug into the new API enough to know how much work it would be to update this plugin to make it work again, but the new API has a lot of nice features. The old API works if your app has already been authorized, but new apps must use the new API.
http://blog.dropbox.com/?p=915
Dear all, has this issue been solve? It seems there’s only one available result on Google regarding Session Expire issue. Pressbox is definitely brilliant and definitely is my problem solver but I’m jammed now. Will there be any upgrade on Pressbox?
Hi,
I am also facing this. Can you tell us when an updated of this plugin will be released to solve this issue?
Hi Les Harris,
I am trying to use this plugin and there is no way it will work unless you really fix the OAuth of Dropbox. Can you please get this fixed asap as nobody has been able to authenticate it with DropBox and it makes this plugin useless, this is annoying as many people download it and nobody can use it so can you get this fixed right away please?
Unhappy User!
I am also having the same issue… Will this be updated, or have you given up on this project…?
Just wondering if the “Session Expired” issue is going to get resolved at all? I know free plug-in development usually takes a backseat to paid work. I can be a patient waiter, I would just like to know if there are plans to fix the problem or if this plug-in is dead.
thanks,
C
Hi there,
When I try to connect my blog to Dropbox I get : The request to link the app is invalid
Any idea?
I get this too…
Hello Les
I have installed the plugin and followed the steps explained on the settings page.
Upon connecting to Dropbox, I get the same error as Tany and Simon:
The request to link the app is invalid.
I’ve tried both, an app folder restricted app and a full access app, the error message is the same.
An help would be really appreciated.
Regards, Roger
I receive this error as well.Any help would be appreciated!
Hi,
This looks exactly like what I need. I followed the steps described and instered the key and the secret. I clicked on the link button but got a message saying the request was invalid..Where did I go wrong ? I must say that I am very new to WordPress and I know only simple HTML but not PHP..
I am trying to build a website where guides of Jerusalem – there are about 200 of us in the forum, can exchange files which are in a Dropbox account we already have. This will be a huge help for all of us.
I am supposed to show this on the meeting we have on Thusday night and I cannot get it working..
Thanks in advance,
Duby
Thanks
I’m also having the problem with “The request to link the app is invalid.” when I try to connect.
It would be awesome if this plugin could be further maintained!
My 2 cents worth: I am having the same problem.
error message is: The request to link the app is invalid.
1. it doesn’t matter what choice of dropbox access I specify (AppFolder only… or Full Dropbox)
2. it doesn’t matter if I use FireFox, Safari, or Chrome (latest versions)
3. emptying my cache first,.. helps not.
4. reversing the Key and Secret (it was worth a try) helps not.
5. on firefox, the error console reveals nothing useful
Curiously… If I am NOT logged into DropBox in the browser,.. BEFORE I see the error message, I DO* first get “An application wants to link… ” blah blah. But on login,.. no go.
Man!
Out there there’s no plugin like this one. This is awesome and there are . But it has to be fixed. Don’t know if you are on it, but please do fix it.
I have found the same problem on connecting. Dropbox displays the message “The request to link this app is invalid”
I´m actually having the same problem. “The request to link this app is invalid” and was thinking about the API, maybe it´s been re-coded and the plugin´s got an old url for being detected.
Maybe the issue should be in this function: (file pressbox-api.php)
function lh_pressbox_get_account_info( $ connection) {
$data = $ connection-> get (‘account/info’);