TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

X0.at: upload files from cURL

151 pointsby mpsqabout 4 years ago

23 comments

uploaderwinabout 4 years ago
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&#x27;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&#x27;ve learned, anything more than 30 minutes can get you into trouble.
评论 #26468753 未加载
评论 #26471915 未加载
评论 #26471640 未加载
the_arunabout 4 years ago
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.
评论 #26467847 未加载
评论 #26467959 未加载
评论 #26468041 未加载
naturalpbabout 4 years ago
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:&#x2F;&#x2F;content.dropboxapi.com&#x2F;2&#x2F;files&#x2F;upload" rel="nofollow">https:&#x2F;&#x2F;content.dropboxapi.com&#x2F;2&#x2F;files&#x2F;upload</a> --header &quot;Authorization: Bearer ACCESSTOKEN&quot; --header &quot;Dropbox-API-Arg: {\&quot;path\&quot;: \&quot;&#x2F;DROPBOXFILEPATH&#x2F;DROPBOXFILENAME\&quot;}&quot; --header &quot;Content-Type: application&#x2F;octet-stream&quot; --data-binary @&#x2F;LOCALFILEPATH&#x2F;LOCALFILENAME
评论 #26471905 未加载
umviabout 4 years ago
These are always nice little sites to have around, but they can&#x27;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.
评论 #26467861 未加载
评论 #26467396 未加载
评论 #26468918 未加载
评论 #26467607 未加载
评论 #26467548 未加载
apayanabout 4 years ago
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 &#x27;HTTP channels&#x27; 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:&#x2F;&#x2F;patchbay.pub&#x2F;" rel="nofollow">https:&#x2F;&#x2F;patchbay.pub&#x2F;</a>
评论 #26468976 未加载
评论 #26472954 未加载
40fourabout 4 years ago
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&#x27;s a cool demonstration on a very straight forward way to upload &amp; share files! Could be a good starting point to develop further.
评论 #26468630 未加载
_joelabout 4 years ago
Alternatively <a href="https:&#x2F;&#x2F;transfer.sh&#x2F;" rel="nofollow">https:&#x2F;&#x2F;transfer.sh&#x2F;</a>
评论 #26467888 未加载
评论 #26467695 未加载
southerntofuabout 4 years ago
Another alternative: the famous nullpointer <a href="https:&#x2F;&#x2F;github.com&#x2F;mia-0&#x2F;0x0" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mia-0&#x2F;0x0</a><p>A small script i use very regularly:<p><pre><code> #!&#x2F;usr&#x2F;bin&#x2F;env bash if [ ! -f $1 ]; then echo &quot;MISSING: $1&quot;; exit 1; fi torify curl -F&quot;file=@$1&quot; https:&#x2F;&#x2F;YOURSERVER || echo &quot;UPLOAD FAILED (code: $?)&quot;</code></pre>
SeriousMabout 4 years ago
Because this is an austrian domain you need to put an Impressum on it with details about the hosters name and address. Sorry to spoil the fun :(
laurensrabout 4 years ago
Alternatively <a href="https:&#x2F;&#x2F;bashupload.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bashupload.com&#x2F;</a>
mratzloffabout 4 years ago
For simple peer-to-peer file sending between technically-inclined people, I use Magic Wormhole.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;magic-wormhole&#x2F;magic-wormhole" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;magic-wormhole&#x2F;magic-wormhole</a>
qrv3wabout 4 years ago
I&#x27;ll tack on mine as well, which you can self-host: <a href="https:&#x2F;&#x2F;github.com&#x2F;schollz&#x2F;share" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;schollz&#x2F;share</a><p>Also there is a cute alias you can do to easily &#x27;share&#x27; files:<p>alias share=&#x27;f() { curl --progress-bar --upload-file &quot;$1&quot; <a href="https:&#x2F;&#x2F;share.schollz.com" rel="nofollow">https:&#x2F;&#x2F;share.schollz.com</a> | tee &#x2F;dev&#x2F;null; echo };f&#x27;
georgewsingerabout 4 years ago
Wolfram also allows this with with<p><pre><code> CopyFile[&quot;&#x2F;path&#x2F;to&#x2F;file&quot;,CloudObject[&quot;your.file&quot;]] </code></pre> I use it all of the time.
mlang23about 4 years ago
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...
geocrasherabout 4 years ago
With the CurlyTP protocol, any server can be uploaded to using curl or wget. Access might be a problem though.<p><a href="https:&#x2F;&#x2F;miscdotgeek.com&#x2F;curlytp-every-web-server-is-a-dead-drop&#x2F;" rel="nofollow">https:&#x2F;&#x2F;miscdotgeek.com&#x2F;curlytp-every-web-server-is-a-dead-d...</a>
orfabout 4 years ago
Gotta love PHP <a href="https:&#x2F;&#x2F;github.com&#x2F;Rouji&#x2F;single_php_filehost&#x2F;blob&#x2F;master&#x2F;index.php" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Rouji&#x2F;single_php_filehost&#x2F;blob&#x2F;master&#x2F;ind...</a>
_whm1about 4 years ago
Another self-hosted script (Python) that aims for easy integration with curl<p><a href="https:&#x2F;&#x2F;github.com&#x2F;kennell&#x2F;curldrop" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kennell&#x2F;curldrop</a>
miguelmotaabout 4 years ago
I&#x27;ve been using sprunge.us for years<p>cat file.txt | curl -F &#x27;sprunge=&lt;-&#x27; <a href="http:&#x2F;&#x2F;sprunge.us" rel="nofollow">http:&#x2F;&#x2F;sprunge.us</a>
calvinmorrisonabout 4 years ago
The longest running one that I&#x27;ve used for a long time is<p>ix.io
acco102about 4 years ago
Sia <a href="https:&#x2F;&#x2F;siasky.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;siasky.net&#x2F;</a> has also upload from curl.
jchookabout 4 years ago
Reminds me of <a href="https:&#x2F;&#x2F;0x0.st&#x2F;" rel="nofollow">https:&#x2F;&#x2F;0x0.st&#x2F;</a>
hprotagonistabout 4 years ago
i’ve been using 0x0.st pretty happily.
koengabout 4 years ago
This is kinda similar to ix.io. Cool!