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.

QRCP: Transfer files to mobile device by scanning a QR code from the terminal

77 pointsby daw___about 5 years ago

4 comments

daw___about 5 years ago
Author here, this is a refactoring of qr-filetransfer, already discussed in the past [0].<p>Here&#x27;s how it works: qrcp binds a web server to the address of your Wi-Fi network interface on a random port and creates a handler for it. The default handler serves the content and exits the program when the transfer is complete. When used to receive files, qrcp serves an upload page and handles the transfer.<p>The tool prints a QR code that encodes the text:<p><pre><code> http:&#x2F;&#x2F;{address}:{port}&#x2F;{random_path} </code></pre> Most QR apps can detect URLs in decoded text and act accordingly (i.e. open the decoded URL with the default browser), so when the QR code is scanned the content will begin downloading by the mobile browser.<p>To send one or more files (or directories):<p><pre><code> qrcp &#x2F;path&#x2F;to&#x2F;file # Or qrcp send &#x2F;path&#x2F;to&#x2F;file </code></pre> To receive one or more files:<p><pre><code> qrcp receive --output ~&#x2F;Downloads </code></pre> [0] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16647977" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16647977</a>
RMPRabout 5 years ago
This is the feature I&#x27;m missing the most from KDE Connect, transferring from Computer to mobile, I ended up using syncthing with a &#x27;send_to_mobile&#x27; folder, not the main purpose but... it works.
评论 #22917099 未加载
hawskiabout 5 years ago
That is nice and delightfully simple.<p>When I saw the title I thought, that it will transfer a file entirely via continuous QR code scanning. But it would be probably too error prone and too slow, especially without a back channel to signify acks.<p>Maybe such a thing could work between two phones facing each other screens using front cameras. I wonder how fast could it practically get.
评论 #22943559 未加载
anderspitmanabout 5 years ago
Nice. I like that it goes over your local network and has a way to reverse transfer from the remote browser.