Add maxSizeAutoDownloads with default set to 10Mb
This commit is contained in:
parent
324ccd70b3
commit
db517fbd9c
9 changed files with 12 additions and 8 deletions
|
|
@ -1507,7 +1507,7 @@ export default {
|
|||
|
||||
setReplyToImage(event) {
|
||||
util
|
||||
.getThumbnail(this.$matrix.matrixClient, event)
|
||||
.getThumbnail(this.$matrix.matrixClient, event, this.$config)
|
||||
.then((url) => {
|
||||
this.replyToImg = url;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export default {
|
|||
const width = this.$refs.image.$el.clientWidth;
|
||||
const height = (width * 9) / 16;
|
||||
util
|
||||
.getThumbnail(this.$matrix.matrixClient, this.event, width, height)
|
||||
.getThumbnail(this.$matrix.matrixClient, this.event, this.$config, width, height)
|
||||
.then((url) => {
|
||||
const info = this.event.getContent().info;
|
||||
// JPEGs use cover, PNG and GIF ect contain. This is because PNG and GIF are expected to
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ export default {
|
|||
};
|
||||
ret.promise =
|
||||
util
|
||||
.getThumbnail(this.$matrix.matrixClient, e, 100, 100)
|
||||
.getThumbnail(this.$matrix.matrixClient, e, this.$config, 100, 100)
|
||||
.then((url) => {
|
||||
ret.src = url;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default {
|
|||
const width = this.$refs.image.$el.clientWidth;
|
||||
const height = (width * 9) / 16;
|
||||
util
|
||||
.getThumbnail(this.$matrix.matrixClient, this.event, width, height)
|
||||
.getThumbnail(this.$matrix.matrixClient, this.event, this.$config, width, height)
|
||||
.then((url) => {
|
||||
const info = this.event.getContent().info;
|
||||
// JPEGs use cover, PNG and GIF ect contain. This is because PNG and GIF are expected to
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ export default {
|
|||
};
|
||||
ret.promise =
|
||||
util
|
||||
.getThumbnail(this.$matrix.matrixClient, e, 100, 100)
|
||||
.getThumbnail(this.$matrix.matrixClient, e, this.$config, 100, 100)
|
||||
.then((url) => {
|
||||
ret.src = url;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export default {
|
|||
}
|
||||
if (event) {
|
||||
const fileSize = util.getFileSize(event);
|
||||
if (!userInitiated && (fileSize == 0 || fileSize > 1000000)) {
|
||||
if (!userInitiated && (fileSize == 0 || fileSize > this.$config.maxSizeAutoDownloads)) {
|
||||
this.userInitiatedDownloadsOnly = true;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue