TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

ShowHN: GetURL - A CLI tool to get a public link for any file

119 pointsby uamsover 12 years ago

19 comments

uamsover 12 years ago
Something I threw together over the weekend. I've been using filepicker on a website of mine. Realized that I could hack it to upload and share files in a simple tool.<p>Inspired by cloudApp, when I found myself wanting a command line version.
评论 #4599488 未加载
评论 #4599489 未加载
adlwalrusover 12 years ago
Seems like this could be done with more respect for user/data sovereignty if done with Node.js. Essentially, you'd cat the file into the script, it would spin up an HTTP server, do some port knocking or whatever NAT-traversal-fu is necessary, then spit out a link with either your raw IP, or a preconfigured dynDNS domain name.<p>This way we aren't carelessly littering our data all over the "cloud".
评论 #4600494 未加载
评论 #4600486 未加载
nyan_sandwichover 12 years ago
Another:<p><pre><code> cat file | curl -F 'sprunge=&#60;-' sprunge.us</code></pre>
评论 #4599573 未加载
corfordover 12 years ago
Nice work and very handy.<p>I hadn't come across filepicker.io before and reading through the geturl code something jumped out at me:<p>APIKEY = check_output(['curl', '--silent', "%(fpurl)s/getKey?email=%(email)s" % {'fpurl': FPAPIURL, 'email': email}])<p>From that, it looks like any random person can fill up your filepicker.io space providing they have your API key or know the email address you used to register the account with. Made sense when I read a bit more about what filepicker.io actually does (i.e. a client-side embeddable javascript file uploader) but it's something to be aware of (especially if you link your account up to an S3 backend!).
评论 #4603265 未加载
nvkover 12 years ago
Neat, +1 on the 'brew' addition intent :)
评论 #4599241 未加载
Zashover 12 years ago
I have no idea why I haven't installed xsel already. The help mentions a secondary clipboard. X has a secondary clipboard? Is there a way to paste that (like middle click for the primary)?
评论 #4600842 未加载
评论 #4601186 未加载
TazeTSchnitzelover 12 years ago
Since I have web hosting and use GitHub, here's my method:<p><pre><code> cp file_name ~/Projects/2012/ajf.me/ajf.me/imagedump/ &#38;&#38; cd ~/Projects/2012/ajf.me/ajf.me/ &#38;&#38; git add imagedump &#38;&#38; git commit -m 'new file' &#38;&#38; cd .. &#38;&#38; ./update.sh </code></pre> Elaborate, sure, but it does the job. update.sh runs git push and then does an SSH into my server and a git pull. (Because I'm too lazy to actually set up git on my own server)
评论 #4600168 未加载
评论 #4599833 未加载
lttlrckover 12 years ago
This is awesome, it actually makes filepicker.io useful for me. My main use-case for Dropbox has turned out to be for this kind of sharing... geturl is waaaaaay easier.
netvarunover 12 years ago
This a nice nifty script. Thanks!<p>Something I noticed (<a href="https://www.filepicker.io/pricing/" rel="nofollow">https://www.filepicker.io/pricing/</a>): Since filepicker.io charges by number of files and NOT by total size of files, a free account could potentially host a huge amount of data.<p>Eg: 5000 files, each of 1 GB = 5 TB!!!
Synthpixelover 12 years ago
It couldn't handle files with spaces, plus the link it gives initiates a download for the file instead allowing you to view it in the browser. Considering most of the time I want to quickly upload a file in this manner the file is a screenshot, this is basically useless for me.
egonschieleover 12 years ago
Very nice! But no Python 2.6 support?
评论 #4600305 未加载
评论 #4599300 未加载
grakicover 12 years ago
What about storage usage?<p><pre><code> &#62; To make it easier to get started, if you haven't &#62; put in your S3 credentials we will store them on &#62; our servers, but as your usage increases we will &#62; ask you to move to your own storage.</code></pre>
tldnrover 12 years ago
Nice tool, I made something similar for dropbox a while back that symlinks/copies files into your DB folder.<p><a href="https://github.com/BRMatt/dotfiles/blob/master/bin/dropup" rel="nofollow">https://github.com/BRMatt/dotfiles/blob/master/bin/dropup</a>
sligover 12 years ago
Nice! There's an opportunity for some company sponsor this (a la localtunnel.com and twilio).
评论 #4599028 未加载
MateusCaruccioover 12 years ago
Inspired by geturl, I built this: <a href="http://news.ycombinator.com/item?id=4626779" rel="nofollow">http://news.ycombinator.com/item?id=4626779</a><p>pro: no storage backend needed con: works only behind a UPnP router (most are ok)
soraggiover 12 years ago
I really liked it, so I ported it to perl implementing a basic caching system (SHA1), I hope you don't mind: <a href="https://github.com/psychotropic/Get--Url/" rel="nofollow">https://github.com/psychotropic/Get--Url/</a>
3rd3over 12 years ago
I still prefer Dropbox because you have better control about what you upload.<p>Simply copy your files into ~/Dropbox/Public, right-click and choose Dropbox &#62; Copy Public URL. Voilà!
评论 #4600352 未加载
syassamiover 12 years ago
Very awesome tool, it's a great way of sharing nice and quickly!
Macphistoover 12 years ago
Nice utility!<p>Just a note:<p>28: exit("`curl` is requrired. Please install it")
评论 #4599079 未加载