Giter Site home page Giter Site logo

probablypablito / discord-attachment-link-shortener Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samihan-m/discord-attachment-link-shortener

0.0 0.0 0.0 42 KB

A web page that shortens given cdn.discordapp.com/attachment/.. and discord.com/channels/ links to point towards the page and redirects those generated links to the proper Discord attachment link afterward.

Home Page: https://dscd.link

JavaScript 78.76% CSS 6.47% HTML 14.77%

discord-attachment-link-shortener's Introduction

discord-attachment-link-shortener

Check it out at https://dscd.link!

A web page that shortens given cdn.discordapp.com/attachment/.. and discord.com/channels/ links to point towards the page and redirects those generated links to the proper Discord attachment link afterward.

Technology

Uses NodeJS. Converts the data in the link from BigInt to Base64 to shorten it, and reverses that to redirect the user to the original file.

How Effective is the Link Shortening?

Parts of the URL that contain server, channel, or message codes are shortened by about 7 characters. File names are left untouched for readability's sake (users will have an idea of what they are clicking on when they see a shortened link). cdn.discordapp.com and discord.com are shortened to dscd.link (a shortening of 9 characters and 2 characters, respectively).

Example shortened links: https://cdn.discordapp.com/attachments/763533415978762261/925208250020933652/Dreamcast_Swirl.jpeg -> https://dscd.link/file/CpidmLGOABU/DNcAAF3CMBQ/Dreamcast_Swirl.jpeg (shortened by 30 characters) https://discord.com/channels/713671901985243137/763533415978762261/925208250188714034 -> https://dscd.link/msg/Ced40EwCAAE/CpidmLGOABU/DNcAAGfCUDI (shortened by 28 characters)

I'd say that's a pretty significant reduction!

discord-attachment-link-shortener's People

Contributors

probablypablito avatar samihan-m 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.