Skip to content

Commit 9ca7898

Browse files
committed
Disable QR code for url sharing (useful if PsiTransfer is only in intranet available)
1 parent c4c0258 commit 9ca7898

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

app/src/Upload.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
div(v-else-if="$root.configFetched")
2121
.well(v-show="state === 'uploaded'")
2222
.pull-right.btn-group.upload-success-btns
23-
a.btn.btn-primary(@click.prevent="showQrCode" href="#" :title="$root.lang.showQrCode")
23+
a.btn.btn-primary(v-if="!disableQrCode", @click.prevent="showQrCode" href="#" :title="$root.lang.showQrCode")
2424
icon.fa-fw(name="qrcode")
2525
| QR-Code
2626
a.btn.btn-primary(:href="mailLnk" :title="$root.lang.sendViaMail")
@@ -90,7 +90,7 @@
9090
9191
computed: {
9292
...mapState(['state']),
93-
...mapState('config', ['uploadPassRequired', 'uploadPass', 'requireBucketPassword']),
93+
...mapState('config', ['uploadPassRequired', 'uploadPass', 'requireBucketPassword', 'disableQrCode']),
9494
...mapState('upload', ['sid', 'files', 'password']),
9595
...mapGetters(['error', 'disabled']),
9696
...mapGetters('upload', ['percentUploaded', 'shareUrl', 'bucketSize', 'bytesUploaded']),

config.js

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ const config = {
6060
"maxFileSize": null, // Math.pow(2, 30) * 2, // 2GB
6161
"maxBucketSize": null, // Math.pow(2, 30) * 2, // 10GB
6262
"plugins": ['file-downloaded-webhook', 'file-uploaded-webhook'],
63+
// Disable the QR code button for download url sharing, set to true to disable
64+
"disableQrCode": false,
6365
};
6466

6567
// Load NODE_ENV specific config

lib/endpoints.js

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ app.get(`${ config.baseUrl }config.json`, (req, res) => {
109109
requireBucketPassword: config.requireBucketPassword,
110110
maxFileSize: config.maxFileSize,
111111
maxBucketSize: config.maxBucketSize,
112+
disableQrCode: config.disableQrCode,
112113
};
113114

114115
eventBus.emit('getFrontendConfig', frontendConfig);

0 commit comments

Comments
 (0)