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.

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

238 pointsby daw___about 7 years ago

19 comments

paulgbabout 7 years ago
Nice! (Shameless plug follows) I use a similar technique in the notify-run Python package for setting up push notifications to an Android device from Python: <a href="https:&#x2F;&#x2F;github.com&#x2F;paulgb&#x2F;notify.run&#x2F;blob&#x2F;master&#x2F;py_client&#x2F;README.rst" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;paulgb&#x2F;notify.run&#x2F;blob&#x2F;master&#x2F;py_client&#x2F;R...</a>
评论 #16650909 未加载
评论 #16651075 未加载
daw___about 7 years ago
From the README:<p>This program binds a web server to the address of your wifi network interface on a random port, and sets a default handler for it. The default handler serves the content and quits the program when the transfer is complete.<p>The program prints a QR code that encodes the text:<p><a href="http:&#x2F;&#x2F;{address}:{port}" rel="nofollow">http:&#x2F;&#x2F;{address}:{port}</a><p>Most QR apps can detect URLs in decoded text and act accordingly (i.e.: open the URL with the default browser), so when QR the code is scanned the content starts being downloaded by the mobile browser.
评论 #16649336 未加载
评论 #16650368 未加载
ktpsnsabout 7 years ago
An innovative idea, I like it and could think of using it. Actually it would be more helpful if there was a way to transfer multiple files in a reasonable manner. While the server implementation would be trivial, the mass downloading client on the mobile phone is obviously the tricky part. Effective file managament on the mobile phone is even bad on Android, in my experience.
评论 #16649458 未加载
kureikainabout 7 years ago
This is amazing. Always looking for something like this. The old way I used to do is to run a HTTP server with an upload form in the mobile phone. But this requires an app on phone to run that server.<p>The idea of QR code is amazing. I&#x27;ll put this to my news letter next week. Look out for it
评论 #16651111 未加载
ryanmarshabout 7 years ago
I’ve experimented with this for a while. My clients often have very locked down windows laptops but they oddly allow hand typed powershell scripts to run.<p>If you “play” a series of qr codes with checksums and record them from a phone and process the video on the phone you can exfil data without tripping any IDS.<p>Opening a port often requires privileges or can at least trip an IDS. Silly really.
评论 #16653444 未加载
评论 #16652723 未加载
jonplackettabout 7 years ago
Really smart. Was also worried it would be tranfered via some random web server but it’s a really elegant solution. Well done!
评论 #16652508 未加载
yoz-yabout 7 years ago
Looks useful and fun, however it does not seem to work correctly with ipv6 on mac? I obtain:<p><pre><code> 2018&#x2F;03&#x2F;22 18:46:55 listen tcp: address fe80::XX:XXXX:XXX:XXXX:57532: too many colons in address</code></pre>
评论 #16650911 未加载
评论 #16651743 未加载
spiegltabout 7 years ago
Great project! I&#x27;m working on one that&#x27;s somewhat related, it&#x27;s basically cross-platform AirDrop (though only for laptops). Seems like mine could really benefit from a method of getting files to phones like this, and yours could benefit from not needing a wireless network like Flying Carpet. <a href="http:&#x2F;&#x2F;github.com&#x2F;spieglt&#x2F;flyingcarpet" rel="nofollow">http:&#x2F;&#x2F;github.com&#x2F;spieglt&#x2F;flyingcarpet</a>
评论 #16656109 未加载
andmariosabout 7 years ago
Here is a small issue: <a href="https:&#x2F;&#x2F;github.com&#x2F;claudiodangelis&#x2F;qr-filetransfer&#x2F;blob&#x2F;master&#x2F;main.go#L65" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;claudiodangelis&#x2F;qr-filetransfer&#x2F;blob&#x2F;mast...</a><p>I don&#x27;t know if it is the barcode scanner app (I use the one from zxing, a very popular choice), or the Android implementation (LG, Android 7), but here is a description of what happens:<p>As soon as I scan the barcode, it is copied to the clipboard. Then something goes to check if the URL is working (the barcode app? android clipboard? not sure). Since you exit after the first request, my browser never gets the chance to download the file. If I remove the os.Exit(), I get it working (and then terminate qr-filetransfer via ctrl+c).<p>Anyhow, very nice work. Kudos!
评论 #16656129 未加载
kamil9about 7 years ago
did something similar with features like upload,view files before download and file creation time (shameless plug :P ) <a href="https:&#x2F;&#x2F;github.com&#x2F;kamilkabir9&#x2F;LDrop" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kamilkabir9&#x2F;LDrop</a>
评论 #16656137 未加载
daw___about 7 years ago
Demo (GIF): <a href="https:&#x2F;&#x2F;twitter.com&#x2F;daw985&#x2F;status&#x2F;976881805864337409" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;daw985&#x2F;status&#x2F;976881805864337409</a>
dyaroslaabout 7 years ago
Looks like a cool project! Only quickly glanced at the code but couldn’t find it: where does this transfer files to on an iOS device? Does it even work with iOS?
评论 #16651065 未加载
评论 #16657727 未加载
评论 #16651069 未加载
fiatjafabout 7 years ago
Doesn&#x27;t work here. As soon as I scan the QR code with my phone, I&#x27;m prompted by the barcode-scanner app to open the URL (192.168.15.whatever) on the browser, but at the time this happens qr-filetransfer is already closed and not listening anymore, it has closed immediately when the QR code was read.<p>How does it happen I cannot know.
评论 #16653235 未加载
评论 #16653220 未加载
laurent123456about 7 years ago
That&#x27;s pretty cool. I wonder if it could be adapted to use something like Nextcloud to avoid the requirement of being on the same wifi.<p>The workflow would be something like: Upload to Nextcloud (it would need to ask username&#x2F;password) =&gt; Get Nextcloud URL (eg via WebDAV) =&gt; Create QR code.
评论 #16651928 未加载
评论 #16652226 未加载
eudoxusabout 7 years ago
How is this not called qrcp? :&#x2F;
评论 #16656140 未加载
throw501about 7 years ago
nice, thanks.<p>would be nice if it could allow pipes. example to send the clipboard:<p>$ pbpaste | qr-filetransfer 2018&#x2F;03&#x2F;22 15:06:48 At least one argument is required
评论 #16651750 未加载
评论 #16652325 未加载
kodejuiceabout 7 years ago
Very similar to the eay Expo works
kodejuiceabout 7 years ago
Very similar to the way Expo works
thrownaway954about 7 years ago
awesome project
评论 #16649792 未加载