Yeah this is asking for trouble. We only had a small demo on our homepage where users could upload media files and they were deleted after 24 hours and still some people managed to abuse it and nearly got our site killed, domain blacklisted in Google with a big red screen of death.<p>I don't want to spam any links here but if you are interested please do look at my last post about the dangers of doing this and lessons I learned from my mistake.<p>Please do not keep the files for 10 days. Even 24 hours is a deal-breaker. From what I've learned, anything more than 30 minutes can get you into trouble.
Uploading files without auth layer - is asking for trouble IMHO. Change without audit trail will encourage wrong doers. But I get the idea, this is an example for a file upload in a simple way using Curl or other tools.
One can upload a file to their Dropbox via a cURL post, provided they have created an app and have an access token, which just takes a few minutes to set up.<p>curl -X POST <a href="https://content.dropboxapi.com/2/files/upload" rel="nofollow">https://content.dropboxapi.com/2/files/upload</a> --header "Authorization: Bearer ACCESSTOKEN" --header "Dropbox-API-Arg: {\"path\": \"/DROPBOXFILEPATH/DROPBOXFILENAME\"}" --header "Content-Type: application/octet-stream" --data-binary @/LOCALFILEPATH/LOCALFILENAME
These are always nice little sites to have around, but they can't really grow much in popularity before users start abusing them to distribute illegal things at which point the site has to start doing more and more content moderation or be shut down.
If you like the convenience of transferring a file temporarily into the cloud to download it elsewhere (great for getting stuff out of a rancher environment), check out patchbay[0]. It uses what it calls 'HTTP channels' so if you start a POST request to a patchbay URL, it will block until a corresponding GET is made to the same endpoint which will receive the data from your POST. The operation can be done in reverse as well, with the GET blocking until the POST begins.<p>[0] <a href="https://patchbay.pub/" rel="nofollow">https://patchbay.pub/</a>
I like the simplicity of it. One PHP file, throw it on a server with Apache and rock and roll.<p>Other comments are right to point out that this site is setting itself up to be abused. My feeling is that this is intended to be a demo. I doubt the creator is trying to provide a real service here. And they might be in for a rude awakening if it gains traction.<p>But, it looks like they intend this to be open source. Anyone can clone the repo and run this on their own server! Unfortunately, the repo does not have a license file, which makes me a little uneasy.<p>Edit: I didn’t say that very well. With no license file, technically we cannot actually use this code since it defaults to ‘All rights reserved’. I think the author might not realize that though. It seems they intend it to be ‘open’ based on line 334.<p>Also, it is not particularly <i>good</i> PHP code, a little rough around the edges. But hey, it's a cool demonstration on a very straight forward way to upload & share files! Could be a good starting point to develop further.
Another alternative: the famous nullpointer <a href="https://github.com/mia-0/0x0" rel="nofollow">https://github.com/mia-0/0x0</a><p>A small script i use very regularly:<p><pre><code> #!/usr/bin/env bash
if [ ! -f $1 ]; then echo "MISSING: $1"; exit 1; fi
torify curl -F"file=@$1" https://YOURSERVER || echo "UPLOAD FAILED (code: $?)"</code></pre>
For simple peer-to-peer file sending between technically-inclined people, I use Magic Wormhole.<p><a href="https://github.com/magic-wormhole/magic-wormhole" rel="nofollow">https://github.com/magic-wormhole/magic-wormhole</a>
I'll tack on mine as well, which you can self-host: <a href="https://github.com/schollz/share" rel="nofollow">https://github.com/schollz/share</a><p>Also there is a cute alias you can do to easily 'share' files:<p>alias share='f() { curl --progress-bar --upload-file "$1" <a href="https://share.schollz.com" rel="nofollow">https://share.schollz.com</a> | tee /dev/null; echo };f'
Wolfram also allows this with with<p><pre><code> CopyFile["/path/to/file",CloudObject["your.file"]]
</code></pre>
I use it all of the time.
Perfect. a replacement for transfer.sh. I use it to make small audio snippets (synthesized speech) available as URL for Sonos to play. With a decent turnaround time, it works to create your own spoken announcements with something like espeak as the synthesizer. I hope this service will survive the spam it will atract...
With the CurlyTP protocol, any server can be uploaded to using curl or wget. Access might be a problem though.<p><a href="https://miscdotgeek.com/curlytp-every-web-server-is-a-dead-drop/" rel="nofollow">https://miscdotgeek.com/curlytp-every-web-server-is-a-dead-d...</a>
Another self-hosted script (Python) that aims for easy integration with curl<p><a href="https://github.com/kennell/curldrop" rel="nofollow">https://github.com/kennell/curldrop</a>
I've been using sprunge.us for years<p>cat file.txt | curl -F 'sprunge=<-' <a href="http://sprunge.us" rel="nofollow">http://sprunge.us</a>