mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-15 20:15:11 +02:00
Improve readability of maximum upload size error
This commit is contained in:
parent
073a38ef1e
commit
f22a5082b0
|
@ -116,6 +116,7 @@ class Uploader {
|
|||
|
||||
const wasQueueEmpty = this.fileQueue.length === 0;
|
||||
const maxFileSize = store.state.serverConfiguration?.fileUploadMaxFileSize || 0;
|
||||
const maxFileSizeInMB = (maxFileSize / 1024 / 1024).toFixed(0);
|
||||
|
||||
for (const file of files) {
|
||||
if (!file) {
|
||||
|
@ -124,7 +125,7 @@ class Uploader {
|
|||
|
||||
if (maxFileSize > 0 && file.size > maxFileSize) {
|
||||
this.handleResponse({
|
||||
error: `File ${file.name} is over the maximum allowed size`,
|
||||
error: `File "${file.name}" is larger than the maximum allowed size of ${maxFileSizeInMB} MB.`,
|
||||
});
|
||||
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue