kern / filepizza

:pizza: Peer-to-peer file transfers in your browser
https://file.pizza
Other
4.39k stars 331 forks source link

Use shorter urls #65

Closed stonewareslord closed 5 years ago

stonewareslord commented 7 years ago

Would it be possible to replace the four toppings with a five letter code so it's easier to type?

Example: replace https://file.pizza/limburger-squash-chickentikka-pinenuts with https://file.pizza/uNU30

Perhaps each topping list would have a corresponding 5 digit code and either could be typed in to redirect to the same file. Both could be shown at the time of uploading to give users a choice to use the topping url or shortcode url.

onny commented 7 years ago

I tried to overwrite the token string for this and adapted the routing url regex but it didn't work for me. All I get is 404 file not found :(

mitchellpontague commented 6 years ago

@onny is on the right track, but you will need to update the regex at lib/middleware/bootstrap.js aswell as the route params at lib/routes.js

dessalines commented 6 years ago

I'd rather have a QR code, scanning that is a lot easier than typing in.

stonewareslord commented 6 years ago

@dessalines A QR code would be nice, but my use case is sharing between two computers and manually typing in the URL (maybe even through a phone call).

kern commented 5 years ago

implemented in 1.1.0, now live on https://file.pizza :)