Coder Social home page Coder Social logo

drop's Introduction

P2P Image share

This is a super simple P2P image sharing using WebRTC. I wrote this page under one evening using my poor JS skills and ChatGPT. So how does it work?

  1. On the receiving side you open the page which will display a QR code.
  2. On the sending you open the page by scanning the code from the sending side. The QR code contains the PeerJS peer ID.
  3. On the send side the only thing displayed on the page is the file input. You chose a file to send and it will be sent over WebRTC data channel to the receiving side.
  4. The receving side will replace the QR code with the image. That's it.

Why is it useful?

Someone asked me how can you send an image from a phone to a computer without having to upload it anywhere and without being logged in to any accounts on either of the devices. I didn't have a good answer so I wrote this page. What's fascinating is that pre ChatGPT I wouldn't bother at all. I mean I could get exactly the same result but definitely not in an hour or so that I spent on this page.

Why you shouldn't use this page.

While the data sent between the peers is not uploaded to any server it's currently not encrypted in transit, which means anyone between the peers can intercept it. Adding a simple encryption key to the QR code would probably be pretty straight forward, but it's currently out of scope of this experiment ๐Ÿ™ƒ.

drop's People

Contributors

stefangluszek avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.