Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

I built a way to send files from a PC to a phone with no internet

In my college lab, some PCs had no internet. I would finish a file on one PC, then find I could not get it to my phone. The only way out was to move to another PC and do the work again. That is why I added Share to phone

I built a way to send files from a PC to a phone with no internet

In my college lab, some PCs had no internet. I would finish a file on one PC, then find I could not get it to my phone. The only way out was to move to another PC and do the work again. That is why I added Share to phone to IHatePDF.

It sends files, or whole folders, from the PC to a phone. Nothing is uploaded anywhere and no app is needed on the phone.

How it works

You add files or folders, pick how the phone connects, and scan a QR code. There are three ways to connect:

Same Wi-Fi PC hotspot (offline) Bluetooth (offline)
When to use it PC and phone are on the same network (internet not needed) No Wi-Fi network at all: the PC's Wi-Fi card makes a private hotspot No Wi-Fi at all
On the phone Scan one QR code, tap Download Scan a QR code to join the hotspot, then one to download Make Bluetooth visible, pick the phone in the app, tap Accept
Phones Any (Android, iPhone) Any (Android, iPhone) Android only
Size limit None None 4 GB, and slow
Folders Download as a .zip Download as a .zip Sent as one .zip
Needs A network A PC with Wi-Fi Bluetooth on the PC and the phone

The hotspot is the one that matters for a lab with no internet. The PC makes its own Wi-Fi network, the phone joins it by scanning a QR code, and a second scan opens the download page.

Choosing a folder and a file, and picking PC hotspot

QR code with a countdown

Download page on the phone

Staying safe

The QR code stays active for 1, 5 or 10 minutes, and changing the time restarts the countdown. The link stops working when time runs out, when you press Stop sharing, or when you close the app. If the app turned the hotspot on, it turns it off again. For Bluetooth the app never picks a phone for you. You choose it from the phones it finds nearby.

Bluetooth mode looking for nearby phones

What I have not tested

I have not tested it with an iPhone. The same Wi-Fi and hotspot modes are a plain web page, so an iPhone should work, but I have not checked. Bluetooth is Android only, because iPhones cannot receive files over Bluetooth. Share to phone is only in the Windows app. A browser tab cannot run it.

Code and install: https://github.com/Burthcer/IHatePDF (MIT)

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.