TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

X0.at: upload files from cURL

151 点作者 mpsq大约 4 年前

23 条评论

uploaderwin大约 4 年前
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_arun大约 4 年前
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 未加载
naturalpb大约 4 年前
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 未加载
umvi大约 4 年前
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 未加载
apayan大约 4 年前
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 未加载
40four大约 4 年前
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 未加载
_joel大约 4 年前
Alternatively <a href="https:&#x2F;&#x2F;transfer.sh&#x2F;" rel="nofollow">https:&#x2F;&#x2F;transfer.sh&#x2F;</a>
评论 #26467888 未加载
评论 #26467695 未加载
southerntofu大约 4 年前
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>
SeriousM大约 4 年前
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 :(
laurensr大约 4 年前
Alternatively <a href="https:&#x2F;&#x2F;bashupload.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bashupload.com&#x2F;</a>
mratzloff大约 4 年前
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>
qrv3w大约 4 年前
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;
georgewsinger大约 4 年前
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.
mlang23大约 4 年前
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...
geocrasher大约 4 年前
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>
orf大约 4 年前
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>
_whm1大约 4 年前
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>
miguelmota大约 4 年前
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>
calvinmorrison大约 4 年前
The longest running one that I&#x27;ve used for a long time is<p>ix.io
acco102大约 4 年前
Sia <a href="https:&#x2F;&#x2F;siasky.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;siasky.net&#x2F;</a> has also upload from curl.
jchook大约 4 年前
Reminds me of <a href="https:&#x2F;&#x2F;0x0.st&#x2F;" rel="nofollow">https:&#x2F;&#x2F;0x0.st&#x2F;</a>
hprotagonist大约 4 年前
i’ve been using 0x0.st pretty happily.
koeng大约 4 年前
This is kinda similar to ix.io. Cool!