Live data from Hacker News

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

transfer.sh

61–70 of 125 posts

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

#61
post #12

I might be unusual here, but I typically get stuck when trying to copy files off a remote Windows machine. Most recently was an aged Windows server with a version of internet explorer so old that all the modern file upload sites (e.g. https://file.io/ ) seemed to have JavaScript issues. Windows built in WebDAV support didn't work, because it's not installed on Windows server I think. Can anyone come up with a way to…

https://megatools.megous.com/ supports Windows. Not sure if it will run on an old version.

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

#63
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 body at a different location and returning a pointer to it is not supported by this definition. Furthermore:

    Proper interpretation of a PUT request presumes that the user agent
    knows which target resource is desired.  A service that selects a
    proper URI on behalf of the client, after receiving a state-changing
    request, SHOULD be implemented using the POST method rather than PUT.
    If the origin server will not make the requested PUT state change to
    the target resource and instead wishes to have it applied to a
    different resource, such as when the resource has been moved to a
    different URI, then the origin server MUST send an appropriate 3xx
    (Redirection) response; the user agent MAY then make its own decision
    regarding whether or not to redirect the request.
That is, to get the effect you intend, you should either (a) use POST (from which you should return a 201 with the final destination, not 200 like you currently do), or (b) issue a 307 redirect to the final destination of the PUT before accepting any content (and subsequently replying with a 201).

[1] http://tools.ietf.org/html/rfc7231#section-4.3.4

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

#64

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…

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 in this case my decision was to shut it down because of the types of crimes involved and the number of criminals on the service totally outnumbered the 'good guys' and our ability to deal with the assholes was limited.

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

#65
This reminds me of a node.js-based utility I wrote awhile back called filebounce[1], except filebounce streams a file over HTTP/HTTPS and does not store the file on an intermediary server. It also supports tailored curl and GUI browser-based interfaces. I use it as a simple way of copying a file without needing ssh, ftp, samba, etc.

[1] https://github.com/mscdex/filebounce

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

#68
post #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

Because unlike these other examples, this one requires you to install something

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

#69

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.

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

#70

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…

https://www.microsoft.com/en-us/photodna

Microsoft provides an API which identifies child expoilting images.

Post reply on HN