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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Simple web server with drag and drop upload?

9 点作者 gushogg-blake10 个月前
To download files onto another computer there are multiple options for spinning up a simple web server with indexing. Is there a good option for going the other way, i.e. sending files to the host machine? I&#x27;m imagining running a command like:<p>cd some-dir; simple-upload-server<p>And then going to 192... and getting a page with a single file upload, ideally with drag and drop, that just puts any uploaded file into `some-dir`.

11 条评论

gushogg-blake10 个月前
Found this, which does the job:<p>git clone <a href="https:&#x2F;&#x2F;github.com&#x2F;Majidkn&#x2F;nodejs-simple-file-upload">https:&#x2F;&#x2F;github.com&#x2F;Majidkn&#x2F;nodejs-simple-file-upload</a><p>cd nodejs-simple-file-upload<p>npm i<p>npm start
codingdave10 个月前
If you are talking about a 192... address, does that mean you want to do this between systems on your local network?<p>If so, you don&#x27;t need a web server. Share the directory on the destination box as a network share. Open that shared directory on the source system, and drag away. Details depend on what OS we are talking about, but why re-invent shared drives&#x2F;directories?
nicodemusdu9 个月前
<a href="https:&#x2F;&#x2F;github.com&#x2F;filebrowser&#x2F;filebrowser&#x2F;releases">https:&#x2F;&#x2F;github.com&#x2F;filebrowser&#x2F;filebrowser&#x2F;releases</a><p>Hey, check out Filebrowser. It&#x27;s this cool open-source tool I found. You just drag files onto a webpage to upload them, and you can manage everything right there. Super easy to use and totally free. Worth a look if you need to organize files online.
solardev10 个月前
You can definitely make such a page, but auth will be a problem. If you don&#x27;t protect it, people will start uploading random shit to it.<p>Probably setting up a sftp or ssh daemon (enabling rsync and scp) would be about as simple and much safer.<p>If you want to stick with HTTP, it could be a simple PHP or JS page protected by basic auth. This isn&#x27;t really a web server issue, you just need to write a simple HTML page to enable that upload.
mks_shuffle10 个月前
Another option with Python is<p>uploadserver: <a href="https:&#x2F;&#x2F;github.com&#x2F;Densaugeo&#x2F;uploadserver">https:&#x2F;&#x2F;github.com&#x2F;Densaugeo&#x2F;uploadserver</a><p>python built-in: python -m http.server &lt;port&gt; (does not support upload)
kejaed10 个月前
You could try remi. It supports file uploads out of the box and is pretty simple to get up and running:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;rawpython&#x2F;remi">https:&#x2F;&#x2F;github.com&#x2F;rawpython&#x2F;remi</a>
vednig10 个月前
Checkout <a href="https:&#x2F;&#x2F;doshare.me" rel="nofollow">https:&#x2F;&#x2F;doshare.me</a><p>Code on Github: <a href="https:&#x2F;&#x2F;github.com&#x2F;doshareme">https:&#x2F;&#x2F;github.com&#x2F;doshareme</a>
sandreas10 个月前
Use localsend[1]. Works everywhere...<p>1: <a href="https:&#x2F;&#x2F;localsend.org" rel="nofollow">https:&#x2F;&#x2F;localsend.org</a>
austin-cheney10 个月前
192.168 is a non-routable address space. That means you are limited to the local network behind your router.<p>1. Set up SMB sharing. It’s amazing and universal across different operating systems. Then you can go to \\192.168.whatever to access your files with drag and drop.<p>2. Set up a netbios name for your new file server so that it can be as simple as \\x.<p>3. Set up PiHole on your local network as a simple domain manager and fall back to 1.1.1.3 or 8.8.8.8 for free public DNS services. Then point your router to your server IP address for DNS resolution to custom domains. Now you can set up custom domains like <i>www.x</i>.<p>4. You can write your own web server easily. I did. Now I have universal proxy and domain redirection via a simple config file. I can proxy anything from webpages to 20gb mp4s directly into the browser. This will get you started <a href="https:&#x2F;&#x2F;github.com&#x2F;prettydiff&#x2F;webserver&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;prettydiff&#x2F;webserver&#x2F;</a><p>5. Create symlink between your web page root and your file share. Now your files are available via domain through the browser like <a href="https:&#x2F;&#x2F;www.x&#x2F;files&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.x&#x2F;files&#x2F;</a><p>Good luck
verdverm10 个月前
man scp<p>It works both directions over ssh
aborsy9 个月前
Nextcloud