Fix UI error after upload when share link is too long

The QR-code generation logic had a character limit. This broke the
upload page when the share URL is too long. This has now been fixed to
support an arbitrary number of characters.

Fixes https://gitlab.com/timvisee/send/-/issues/19
This commit is contained in:
timvisee 2021-07-08 21:21:35 +02:00
parent 0e17cd567c
commit 1520942ac9
No known key found for this signature in database
GPG key ID: B8DB720BC383E172

View file

@ -2,7 +2,7 @@ const raw = require('choo/html/raw');
const qrcode = require('../qrcode');
module.exports = function(url) {
const gen = qrcode(5, 'L');
const gen = qrcode(0, 'L');
gen.addData(url);
gen.make();
const qr = gen.createSvgTag({ scalable: true });