Live data from Hacker News

$ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

transfer.sh

41–50 of 125 posts

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#41

Why give that elaborate command line call instead of the clearer, simpler one in the example? curl --upload-file ./hello.txt https://transfer.sh/hello.txt In any case - cool! Good domain name too.

I think the point is to illustrate that you can pipe things into it. There exist programs that work on files, and work much worse or not at all on standard input; this example thus demonstrates more power.

(Though, alluded to below, the "-X PUT" may be totally superfluous.)

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#42
post #14

It'd be cool to have the ability to pipe stuff over the Internet from shell in real time like you would with SSH for instance. So I could do: A$ curl --upload-file - http://blah B$ curl http://blah/uYsfVX and see live stream of data on B.

You can do that with netcat if either A or B are listening.

Well over the "Internet" kind of implies behind a firewall so the service would be a convenience to avoid setting up port forwarding etc.

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#43
post #14

It'd be cool to have the ability to pipe stuff over the Internet from shell in real time like you would with SSH for instance. So I could do: A$ curl --upload-file - http://blah B$ curl http://blah/uYsfVX and see live stream of data on B.

That would be cool, but the devil is in the details. For one thing, does the "upload" wait for at least one "download" to connect? Or does "upload" go to a cache that is re-used for all subsequent downloads? What are the timeouts? E.g. how long would blah.com hold the upload connection open until (at least one) download opened up? The other thing that makes it less cool is that it's a hack that would be better off no…

I think it should be as dumb and simple as possible and do nothing deviating from normal unix behavior (ie pipe). So it would cache only one chunk of data sent by A and start streaming to the first download request.

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#44

Why give that elaborate command line call instead of the clearer, simpler one in the example? curl --upload-file ./hello.txt https://transfer.sh/hello.txt In any case - cool! Good domain name too.

I think the point is to illustrate that you can pipe things into it. There exist programs that work on files, and work much worse or not at all on standard input; this example thus demonstrates more power. (Though, alluded to below, the "-X PUT" may be totally superfluous.)

The pipe is into curl, has nothing to do with the website itself

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#45

I always wonder how sites like these deal with stuff like potentially hosting child porn/other content that is illegal to possess. Does DCMA safe harbor stuff cover it? (don't see a DCMA notice on the site)

You can leave out the 'potentially'. I shut down a file sharing service specifically for that reason, it is just about impossible not to become a vector for the transmission of illegal or objectionable content. DMCA does not cover it, because the DMCA is about copyright, not about content that is illegal to possess regardless of how you got it. That said, the police (at least, the police here) is more than happy to work together with you to help keep the CP peddlers out but it's a losing battle, there are a very large number of them and you'll be hard pressed to work 24/7 all year long and since you can upload encrypted files you can't be sure of what's being transferred anyway.

Which is a good thing, after all what is being uploaded is strictly speaking none of my business but it automatically makes you complicit in roughly the same way that running a TOR exit node will make you complicit and I don't want any part of that. I'm perfectly ok with setting up useful services at very little or no fees at all but I refuse to become an unwitting and unwilling partner in other peoples illegal dealings.

Which is a pity.

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#47

Why give that elaborate command line call instead of the clearer, simpler one in the example? curl --upload-file ./hello.txt https://transfer.sh/hello.txt In any case - cool! Good domain name too.

Or like this with HTTPie[0]:

    http PUT https://transfer.sh/hello.txt 
[0] http://httpie.org

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#49
There are a lot of sites like this. The only thing that's sorta neat about this file is that the filesize limit is so high. Getting around the size limit is fairly easy by using split or something similar so that's not too big of a deal.

Others that come to mind are pomf.se clones like 1339.cf or comfy.moe and nekuneku's current site, uguu.se. Many paste services could also be used to achieve the same result, ix.io and sprunge.us come to mind.

Re: $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt

#50
post #42

Earlier quoted context omitted.

You can do that with netcat if either A or B are listening.

Well over the "Internet" kind of implies behind a firewall so the service would be a convenience to avoid setting up port forwarding etc.

VPN are a thing.

I recommend just installing cjdns and forwarding the home end. It also encrypts your traffic. You wouldn't want to netcat in cleartext over the internet.

Post reply on HN