Live data from Hacker News

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

transfer.sh

81–90 of 125 posts

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

#81

Earlier quoted context omitted.

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.

You could always just pipe it through ssh or some other thing. Setting up openvpn or similar is nontrivial - even if you're lucky enough to have a static IP and enough spare time to make it work.

> Setting up openvpn or similar is nontrivial

Setting up cjdns is less work than setting up SSH.

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

#82

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…

Have you thought that maybe you don't have to fight the cp?

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

#83

FYI PUT is misused here. From RFC 7231 [1]: The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload. A successful PUT of a given representation would suggest that a subsequent GET on that same target resource will result in an equivalent representation being sent in a 200 (OK) response. Placing the PUT bo…

This was not an invalid use of PUT in RFC2616, then httpbis decided it always had been and changed it.

It was part of RFC 2616, also:

"The PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server. If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new resource by the requesting user agent, the origin server can create the resource with that URI.

".. The fundamental difference between the POST and PUT requests is reflected in the different meaning of the Request-URI. The URI in a POST request identifies the resource that will handle the enclosed entity. That resource might be a data-accepting process, a gateway to some other protocol, or a separate entity that accepts annotations. In contrast, the URI in a PUT request identifies the entity enclosed with the request -- the user agent knows what URI is intended and the server MUST NOT attempt to apply the request to some other resource."

RFC2616[1] Fielding, et al.

This is a key part of the spec, and you can see Dr. Fielding's intentions in REST. Specific URI 's referring to a Representation of an entity is a core architectural component of REST[2].

1. https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9....

2. https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm

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

#85

FYI PUT is misused here. From RFC 7231 [1]: The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload. A successful PUT of a given representation would suggest that a subsequent GET on that same target resource will result in an equivalent representation being sent in a 200 (OK) response. Placing the PUT bo…

This was not an invalid use of PUT in RFC2616, then httpbis decided it always had been and changed it.

colanderman is correct in his reply. Although RFCs are designed to be very explicit, certain sections are all too often left open to interpretation when vague/ambiguous language is used.

This is not one of those times. It is very clearly defined that PUT, by design, creates a resource at the exact URL provided. The 307 redirect variant mentioned is over-complicating the scenario. The right thing to do is use POST and return 201 Created with a Location header to the created URL.

Just because it works as-is doesn't mean there isn't a better way that strictly follows expected behaviors.

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

#86

Earlier quoted context omitted.

We're lucky that some people are fine with becoming an unwilling partner since without them no internet, no phone, no email, no snail mail, no roads, no electricity, no open source software, no nothing. It's a sad fact of life that pretty much every useful technology, service or piece of infrastructure will be used for illegal dealings of some kind.

It's a matter of proportion to me. If a service is used predominantly to facilitate illegality then I see no reason to continue to run it. The internet, phones, email, regular mail, roads, electricity, software and on on have predominantly good and productive uses. File sharing websites attract percentage wise more bad than good, at least more bad than what I'm comfortable with. So in the end that's a moral call and…

> If a service is used predominantly to facilitate illegality

I guess we should all stop using cash, then?

https://en.wikipedia.org/wiki/Contaminated_currency

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

#87
post #70

Earlier quoted context omitted.

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…

https://www.microsoft.com/en-us/photodna Microsoft provides an API which identifies child expoilting images.

How can you even test such a service legally?

This is a general problem with banning things instead of simply regulating them somehow. How would one scientifically study methamphetamine, for example, in a country where it is illegal to even possess it?

Without arguing for or against CP, what if I wanted to look up evidence that use of CP leads to increase or decrease of actual child abuse, without setting off red flags everywhere? As a Psych major, that sort of thing would interest me, for example.

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

#88
post #80
post #6

Earlier quoted context omitted.

There's an example on how to encrypt the files before sending them to the server: # Encrypt files with password using gpg $ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt # Download and decrypt $ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt

The first cat does absolutely nothing in your example.

are you sure? how else would you pipe to GPG?

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

#89

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

You can do that with pure pipes, without cat:

    foo 
This replaces foo's stdin with a pipe reading from input.

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

#90

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)

I believe that DMCA safe harbor applies. If they're notified that they're hosting such content, then they have to remove it.

No. The safe harbor only applies to copyright infringement.
Post reply on HN