Dropbox Uploader: Bash script to upload, download, list, delete from Dropbox
github.com
github.com
I can currently do this using Dropbox, but it's rather a hassle; the quickest method I've found is to use the web client[1], navigate to my Public folder, drop a file onto it, wait for it to upload, then right-click -> Copy Public Link.
Making that one step would be wonderful. Making the link a "promise"[2], so I don't have to do synchronous clipboard gymnastics when I'm trying to get multiple links at a time, would be even better.
Droplr (https://droplr.com/hello) is pretty similar to all this--but it doesn't do direct links, so my most common usage-pattern for it (treating it as an "I need a CDN to show people this image/audio/video for the next 30 seconds or so, then it can disappear" service) is mooted. Dropbox also changed their service to remove Public folders for new users, with the "shared files" in its place having the same wrapper+HTML embedded file design.
Temporary hotlinking of my own content is important; I'm willing to pay for it!
---
[1] The Dropbox native client's uploading thread is optimized for background "forget about it, it'll just be magically synced later" processing, not synchronous use. The web client lets you upload as fast as your web-browser can manage.
[2] A "promise" link would be something like--if the file hasn't finished uploading yet, figure out whether the User Agent is a human or a script/bot. If it's a script/bot, just let their connection sit open until the file finishes (they won't mind.) If the user-agent is human, however, immediately return a 408 (Timeout) error with HTML body content showing a spinner. Estimate time-to-completion plus a little bit, and put that time into an HTTP "Refresh" header. (Remember those?)
But yes, actual anonymity, like Imgur has (no need to register an account, just low limits and quick expirations) would be much better.
$ wsend README.md | pbcopy
I mention it because I've found that many Mac users, including some fairly Terminal-savvy folks, are unaware of the pbcopy and pbpaste tools for manipulating the clipboard.
Thanks.
It seems that the best way to get people to pay for something is to make it a requirement (to use the service or a set of features).
What I'm building is free, it is Apache2 licensed. The fact is that the self install userbase just isn't that monetizable. So the cost of supporting them is a net negative.
We do it but it is not our first, second or even third priority as a company.
$ linkme -e 1h picture.jpg
https://s3.amazonaws.com/.../.../?ugly_url
$ linkme --expires 1h --shorten picture.jpg
http://bit.ly/something
The promise links would take a little more logic server-side, I think.http://cl.ly/image/3j0h340v0O2E
can trivially be turned into direct links by appending '/content':
http://cl.ly/image/3j0h340v0O2E/content
I do this all the time - the /content links 301 redirect to the asset uploaded, so you can usually do everything from hotlink as stylesheets to enter the link into video players to stream from.
Files are up to 25MB free, 250MB paid and especially when paid, the unlimited files policy means that I no longer even stop to decide whether or not to upload files.
Just a satisfied customer. :P
> ./dropbox_uploader.sh COMMAND [PARAMETERS]...
>
> [%%]: Required param
> <%%>: Optional param
Doesn't square brackets usually mean optional.But my 80% case is just installing Dropbox headless on a server. Then I can use 'ls', 'cp' and 'rm'.
1. fire up a JS-based shell
2. implement basic commands like mkdir, cd, ls, rm, touch etc. (using HTML5 FileSystem API)
3. implement extra command 'edit' that fires up an Ace session on target file
4. allow to mount Google Drive folder via JS API
5. allow to mount Dropbox folder via JS API
I did 1-4 and found out that Google Drive was not a good candidate for this project (too many files of unexploitable format + no real tree-like structure).
Then I lost interest and motivation. Should have inverted 4. and 5 :-/
Please, someone without a demanding day job and/or children, implement something like this! It would be a perfect companion to a Chromebook (offline).
One big place the docs fall down is explaining how it talks to multiple dropbox accounts. Or how it authenticates to any account at all. I'm not nearly as interested in uploading to one dropbox account as 50, or 50K.
The usage case is probably something like an ebook delivery service where you release edition 3 of your "learn trendy language in a ridiculously short amount of time" so you run a script and all 100K previous buyers magically have ebook_version_3.pdf magically appear in their dropbox. There are ebook publishers doing this now. Like Pragmatic. I would imagine they have a tool vaguely like this in their backend system. Or teams of hundreds of bored interns doing it all by hand. Perhaps there's a completely different API for .com bulk uploading. Hopefully we never get Dropbox spam delivery.
Does it mean that I can get a user to upload 500mb file irrespective of if user has dropbox or not?
Kind of like what filepicker.io helps us do?