$ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt
transfer.sh
transfer.sh
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)."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
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.
curl --upload-file ./hello.txt https://transfer.sh/hello.txt
In any case - cool! Good domain name too.(Though, alluded to below, the "-X PUT" may be totally superfluous.)
foo < input
This replaces foo's stdin with a pipe reading from input. http PUT https://transfer.sh/hello.txt < ./hello.txt
[0] http://httpie.orgYou almost never really want "-X".
So yeah it's limited to 30MB for now because I don't have a lot of storage but hey I use that daily hehe
I understand it's impossible to tool the concept to work with a very simple shell one-liner, and without a further dependency like an openssl binary. I like the concept, but I'd rather have to perform a one-time install of openssl or similar and copy a 10-20 line bash script to have true security rather than your current setup that comes with a technically flawed security model.
Obviously you are aware of this, and chose the path of convenience and "good for most uses". Kudos for a clean tool!
But indeed I do agree that I can't guarantee or even prove that I can't access the files on my server. That's why I offer a quick and simple way for people to setup this on their own machine, so they can have this lightweight server and use it as if it was mine just by modifying a line in the configuration file of the client (or changing the URL in the curl commands)
I'm glad you enjoyed the tool though :D
It has a rudimentary android app as well.
A$ curl --upload-file - http://blah < /proc/kmsg
B$ curl http://blah/uYsfVX
and see live stream of data on B.
The other thing that makes it less cool is that it's a hack that would be better off not existing. The ideal case is that every device should have a unique ID, such that we can directly "subscribe" to anything on any device without using an intermediary (well, an application level intermediary anyway; you'll always be using link-level intermediaries). Such an ID might be IPv6, in which case such a service is trivially replaced with ordinary every day ssh/scp.
A$ tar cv * | nc -l -p 1234
B$ nc a.example.net 1234 | tar xv
Or I might remove a 'v' and pipe through 'pv' to see the transfer rate and amount.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.
Setting up cjdns is less work than setting up SSH.
• 10 GB of space for free (with a 10 GB filesize limitation³) over transfer.sh’s 5 GB
• no file expiration date, unlike transfer.sh’s 14-day expiration
――――――
² — https://repo.yandex.ru/yandex-disk/
³ — https://en.wikipedia.org/wiki/Comparison_of_file_hosting_ser...
https://github.com/phillc73/backblazer
It's on CRAN too, but the GitHub version has some updates.
This library should allow complete interaction with b2 for uploading, downloading and manipulating files from within R.
$ curl -T path/to/file chunk.io chunk.io uses an invalid security certificate. The certificate is only valid for the following names: *.herokuapp.com, herokuapp.com Error code: SSL_ERROR_BAD_CERT_DOMAIN
I've signed up for the mailing list in the hopes of getting an actual contact email for the author/s. * Increased filesize limits
* Support for custom domains
* Ability to set download limits or kill date per file
* Analytics about file downloads
* Support for hosted versionWhich 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.
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.
I guess we should all stop using cash, then?
As for how it is possible for all of the available currency to be contaminated with traces of drugs and yet that this does not need to prove that all (or even a majority) of the cash transactions done are drug related, I'm sure you're smart enough to figure that one out for yourself, but evidence such as this will figure prominently in the kind of discussion that will visit us some years into the future.
There are free file upload services and there are ways to upload from command line(1).
Microsoft provides an API which identifies child expoilting images.
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.
It's actually quite well designed and questions such as these were definitely taken into account during the design phase.
I came up with a similar scheme about 15 years ago (as a result of operating that file sharing service) and proposed to the local LE that we set up a service where a 'fingerprint' of an image could be tested against known bad images, and if an image tested positive it would be flagged for review (and on an exact match it would be automatically banned).
The local law enforcement officer thought it was a great idea but it would never fly because even the hashes of the images were considered off-limits for sharing with others and they'd have to share their database of hashes with me if I were to set this up (free of charge).
Eventually MS came up with PhotoDNA and they're too big to ignore.
sigh, that's still less than ideal.
Where it goes haywire is that they then have to trust all the employees of that larger party as well but that's logic rather than CYA.
[1]: http://wbintcvsstorage.blob.core.windows.net/matchedimages/S...
Normal usage: $ more c14.py | sprunge
And it outputs: http://sprunge.us/eCeM
The nice thing about sprunge is that you also have syntax highlighting: http://sprunge.us/eCeM?py
Appending a ?<lang> will syntax highlight the text according to the lang.
P.S.
To use a pipe with sprunge, put an alias in your .zshrc / .bashrc:
alias sprunge="curl -F 'sprunge=<-' http://sprunge.us"
and then use source ./zshrc ( or .bashrc ).
According to http://www.wtfpl.net/about/, the first rule (and the only rule) of WTFPL is:
0. You just DO WHAT THE FUCK YOU WANT TO.
So, I guess you can self host it (:
Uploading a file: curl -F 'f:1=@file.ext' ix.io
[I'm friends with the author.]
Can anyone come up with a way to use a service like this from an old version of Windows that lacks modern web browser, powershell and so on?
$ ipfs add myfile.txt
added QmeeLUVdiSTTKQqhWqsffYDtNvvvcTfJdotkNyi1KDEJtQ myfile.txt
# Access via a public gateway
$ curl https://ipfs.io/ipfs/QmeeLUVdiSTTKQqhWqsffYDtNvvvcTfJdotkNyi1KDEJtQ
# or via a local node
$ curl http://127.0.0.1:8080/ipfs/QmeeLUVdiSTTKQqhWqsffYDtNvvvcTfJdotkNyi1KDEJtQ2. Why is a decentralized service better than a centralized one, for this use case? It seems like neither really has an inherent advantage.
2. With a decentralized system like IPFS, availability of the data does not depend on a single provider. Also, there are no artificial limits on data size and storage time.
TLDR; different usecases.
A much more ingenious approach is ipfs: [1]
[1] https://ipfs.io/
surge path/to/project example.comFor a lot of people with firewalls and no root / admin access, it becomes a major pain.
# 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 gpg ... < hello.txt | curl ...
Its stdin will be the file instead of a pipe, but few programs care about the difference and fewer still in such a way that you'd prefer to use the pipe.[1] https://github.com/dutchcoders/transfer.sh/blob/master/trans...
[2] https://github.com/dutchcoders/transfer.sh/blob/master/trans...
Send files to i@nfil.es
Then you'll get something like this https://nfil.es/EOir5z/
* (defun save(name content) (multiple-value-bind (a b c) (http-request (format nil "https://transfer.sh/~a" name) :method :put :content (write-to-string content)) (list a b c)))
I even had a YN post: https://news.ycombinator.com/item?id=2598682 :)
PS> cat myfile | out-string | iwr -Method Put -Uri https://transfer.sh/myfile.txt PS> Invoke-SSHCommand { cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txt } -session 0
SSH.NET: https://sshnet.codeplex.com/I've been using http://mktorrent.sourceforge.net/ for quite sometime now
One I use all the time is sprunge.us -
$ echo "hello world" | curl -F sprunge="<-" sprunge.us
http://sprunge.us/MEPN while true
do
dt=$(date '+%d%m%Y%H:%M:%S');
screencapture -x file$dt.png
curl --upload-file ./file$dt.png https://transfer.sh/66nb8/capture$dt.png
rm file$dt.png
sleep 1
doneSigh!
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.