News for hackers. Stuff that matters.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by derefr on Monday August 05, 2013 @12:56AM (#6158548)
The one tool I constantly wish for is something like Hyperdesktop (http://gethyperdesktop.com/) 's entry on the Windows "Send To..." menu: something that takes a file on your drive, pushes it anonymously to a file-hosting site (where it'll expire as soon as people stop looking at it for a while), and then puts a link directly to the file on your clipboard. But, you know, for all file-types, not just images.

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?)

Re:Dropbox Uploader: Bash script to upload, download, list, ... by abemassry on Monday August 05, 2013 @01:16AM (#6158594)
check out https://wsend.net I just launched it and it might be what you're looking for. It is anonymous for small files, but you can purchase an account if you'd like to support the service. I would greatly appreciate any feedback and or purchasing of an account. Thanks!
Re:Dropbox Uploader: Bash script to upload, download, list, ... by jamestnz on Monday August 05, 2013 @01:55AM (#6158664)
Looks useful! And in regards to GP's specific request "...and then puts a link directly to the file on your clipboard", on the Mac at least you could do so like this:

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

Re:Dropbox Uploader: Bash script to upload, download, list, ... by joelg236 on Monday August 05, 2013 @02:21AM (#6158715)
This is very awesome. I'm going to start using this, and at some point I might consider buying one of the payed accounts.

Thanks.

Re:Dropbox Uploader: Bash script to upload, download, list, ... by unknownian on Monday August 05, 2013 @02:41AM (#6158750)
I know you want to make money, but consider making a self-hosted version, you could even charge for it.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by jmathai on Monday August 05, 2013 @03:12AM (#6158819)
From my experience (building a SaaS product for consumers which can be self installed) it's not worth the hassle and most people who claim they'd pay actually don't.

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

Re:Dropbox Uploader: Bash script to upload, download, list, ... by unknownian on Monday August 05, 2013 @04:53PM (#6162939)
Alright, but I'd just use some free software alternative on my server.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by jmathai on Monday August 05, 2013 @11:13PM (#6164605)
That supports my statement. People will usually go free if given the option.

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.

Re:Dropbox Uploader: Bash script to upload, download, list, ... by 69_years_and on Monday August 05, 2013 @01:25AM (#6158613)
Like it - esp. the reference to xkcd.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by akx on Monday August 05, 2013 @06:54AM (#6159399)
Modulo the promise links and other fanciness, this could be done really cheaply with S3's expiring content/links feature and a short script... I'm envisioning a CLI like this.

    $ 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.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by tekacs on Monday August 05, 2013 @10:22AM (#6160238)
CloudApp has already been mentioned (and the 'counterpoint' of anonymity has come up), but I might suggest that it's worth at least a cursory look, if nothing else because its copied links:

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

Re:Dropbox Uploader: Bash script to upload, download, list, ... by damian2000 on Monday August 05, 2013 @03:09AM (#6158812)
Last time I used it box.net had something like this - you get a public url that anyone (eg. not registered users) can click to download your file. You can set a timeout and/or download limit before the link becomes disabled.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by coolnow on Monday August 05, 2013 @08:01AM (#6159598)
In Windows, you can make a simple bat file that gets your dropbox id (the numbers that show up in your public links), copy/move the files to your dropbox public dir, then add the dropbox public link to your clipboard complete with the id. It's really basic and really hacky, but you can move it to the appropriate folder so it shows up when you right click > send to. I have one somewhere and it even 7zips everything up before moving.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by GuHmo on Monday August 05, 2013 @02:52AM (#6158775)
I'm using ShareX (http://code.google.com/p/sharex/) for some time now and find it really great. You can configure different upload services for each filetype.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by tuananh on Monday August 05, 2013 @12:58AM (#6158554)
EDIT: i didn't notice the 'annonymously' part but Dropbox isn't anonymous either --- isn't that what's CloudApp and Droplr doing?
Re:Dropbox Uploader: Bash script to upload, download, list, ... by derefr on Monday August 05, 2013 @01:10AM (#6158579)
Dropbox is "pseudonomous-but-it's-a-hassle" -- you can register a new free Dropbox account with a temporary email, and then upload to its storage solely through the web client (avoiding the "only one account synced to your computer user-profile at a time" requirement.)

But yes, actual anonymity, like Imgur has (no need to register an account, just low limits and quick expirations) would be much better.

Re:Dropbox Uploader: Bash script to upload, download, list, ... by ape4 on Monday August 05, 2013 @10:02AM (#6160106)

  > ./dropbox_uploader.sh COMMAND [PARAMETERS]...
  >
  > [%%]: Required param 
  > <%%>: Optional param
Doesn't square brackets usually mean optional.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by teach on Monday August 05, 2013 @01:30AM (#6158623)
This is really cool.

But my 80% case is just installing Dropbox headless on a server. Then I can use 'ls', 'cp' and 'rm'.

Re:Dropbox Uploader: Bash script to upload, download, list, ... by delinka on Monday August 05, 2013 @07:48AM (#6159553)
I came here wondering why anyone would want this instead of just installing the client. Then I realized this script would prevent needing to keep another copy of your library on your system. Clever!
Re:Dropbox Uploader: Bash script to upload, download, list, ... by exitnode on Monday August 05, 2013 @03:50AM (#6158891)
Now you can have ls_nsa and cp_nsa. rm_nsa is obsolete.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by pacoverdi on Monday August 05, 2013 @09:11AM (#6159845)
I wanted to do the same exact thing except in a browser:

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

Re:Dropbox Uploader: Bash script to upload, download, list, ... by christiangenco on Monday August 05, 2013 @02:43AM (#6158759)
This is awesome! I've been meaning to build something like this for my Dropbox anonymous upload site, http://dbinbox.com (shameless self plug). Would be super nice to be able to upload stack traces or log tails as a text file to a Dropbox account without worrying about Auth stuff.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by juanuys on Friday August 09, 2013 @01:28PM (#6186970)
Your Bash + Dropbox combo inspired me to clean up my 1Password hack I've used for the past couple of years and put it online:

https://github.com/opyate/1Bashword

Re:Dropbox Uploader: Bash script to upload, download, list, ... by kleiba on Monday August 05, 2013 @08:02AM (#6159599)
I'm not a dropbox user, but I've always imagined you could simply mount your dropbox as a file system?! I'm surprised that that doesn't seem to be the case.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by VLM on Monday August 05, 2013 @09:17AM (#6159878)
Yeah, I have that set up and ~/Dropbox works pretty well.

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.

Re:Dropbox Uploader: Bash script to upload, download, list, ... by jdf on Monday August 05, 2013 @10:15AM (#6160191)
Not if you're running a normal Linux distro on ARM - Dropbox doesn't provide a binary there. Which is a bummer since there are a number of nice, simple, and cheap machines you can buy nowadays that come with an ARM chip, e.g. a Raspberry Pi.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by ninguem2 on Monday August 05, 2013 @08:27AM (#6159692)
It is the case, on Linux and MacOS. I don't see the point of this software.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by koevet on Monday August 05, 2013 @03:40AM (#6158872)
This tool has been around for a while. All my AWS images sport it, I found it very useful to quickly move files to my computer whenever I need to. Very reliable.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by mostafah on Monday August 05, 2013 @01:26AM (#6158615)
This is the perfect tool for a simple and free backup solution for servers for configuration files, logs, and even encrypted database dumps.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by dewiz on Monday August 05, 2013 @03:25AM (#6158841)
in the free account files get deleted (see docs) so I would suggest not to use it as a backup system. Also, from same docs, the intended use is sending files, becareful with different use cases ;)
Re:Dropbox Uploader: Bash script to upload, download, list, ... by giulianob on Monday August 05, 2013 @06:36AM (#6159356)
Just use S3 for that. There are simple command line tools available.
Re:Dropbox Uploader: Bash script to upload, download, list, ... by BuddhaSource on Monday August 05, 2013 @04:24AM (#6158964)
Please explain to a layman.

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?