DEV Community

Cover image for How I Added Server-Side File Size Limits to a WebSocket File Sharing App
Aditya Sorathiya
Aditya Sorathiya

Posted on Edited on

How I Added Server-Side File Size Limits to a WebSocket File Sharing App

🚀 MagicDrop 0.0.2 is here!

I just added a configurable file-size limit to MagicDrop, my local-network file and text sharing tool for terminal and browser.

📦 Default limit: 512 MB

You can now set your own limit when starting MagicDrop:

md start --limit 1GB
Enter fullscreen mode Exit fullscreen mode

Supported:
• KB
• MB
• GB

Setting File limit example

The limit is enforced on the server, with browser-side validation too.

I also improved the browser UI and fixed several file-transfer issues.

📦 NPM:
https://www.npmjs.com/package/magicdrop-cli

⭐ GitHub:
https://github.com/sorathiya903/magicdrop

Would love to hear your feedback! 🙌

Top comments (0)