mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-25 15:06:26 -08:00
G
This commit is contained in:
parent
a21535cbda
commit
58da5da26e
|
@ -150,6 +150,12 @@ export default class Files {
|
||||||
reserved: true
|
reserved: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// save
|
||||||
|
|
||||||
|
if (settings.owner) {
|
||||||
|
await files.index(settings.owner,uploadId)
|
||||||
|
}
|
||||||
|
|
||||||
// get buffer
|
// get buffer
|
||||||
if (fBuffer.byteLength >= (this.config.maxDiscordFileSize*this.config.maxDiscordFiles)) {
|
if (fBuffer.byteLength >= (this.config.maxDiscordFileSize*this.config.maxDiscordFiles)) {
|
||||||
reject({status:400,message:"file too large"});
|
reject({status:400,message:"file too large"});
|
||||||
|
@ -226,11 +232,7 @@ export default class Files {
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|
||||||
// save
|
|
||||||
|
|
||||||
if (settings.owner) {
|
|
||||||
await files.index(settings.owner,uploadId)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
<!-- container to allow for animate directive -->
|
<!-- container to allow for animate directive -->
|
||||||
<div>
|
<div>
|
||||||
<div class="file" transition:fileTransition style:border={upload[1].uploadStatus.error ? "1px solid #BB7070" : ""}>
|
<div class="file" transition:fileTransition style:border={upload[1].uploadStatus.error ? "1px solid #BB7070" : ""}>
|
||||||
<h2>{upload[1].name} <span style:color="#999999" style:font-weight="400">{upload[1].type}{@html upload[1].type == "upload" ? ` (${Math.round(upload[1].file.size/1048576)}MB)` : ""}</span></h2>
|
<h2>{upload[1].name} <span style:color="#999999" style:font-weight="400">{upload[1].type}{@html upload[1].type == "upload" ? ` (${Math.round(upload[1].file.size/1048576)}MiB)` : ""}</span></h2>
|
||||||
|
|
||||||
{#if upload[1].maximized && !uploadInProgress}
|
{#if upload[1].maximized && !uploadInProgress}
|
||||||
<div transition:padding_scaleY|local>
|
<div transition:padding_scaleY|local>
|
||||||
|
@ -211,7 +211,7 @@
|
||||||
<p style:color="#999999" style:text-align="center">
|
<p style:color="#999999" style:text-align="center">
|
||||||
Hosting <span class="number" style:font-weight="600">{$serverStats.files || "•••"}</span> files
|
Hosting <span class="number" style:font-weight="600">{$serverStats.files || "•••"}</span> files
|
||||||
—
|
—
|
||||||
Maximum filesize is <span class="number" style:font-weight="600">{(($serverStats.maxDiscordFileSize || 0)*($serverStats.maxDiscordFiles || 0))/1048576 || "•••"}MB</span>
|
Maximum filesize is <span class="number" style:font-weight="600">{(($serverStats.maxDiscordFileSize || 0)*($serverStats.maxDiscordFiles || 0))/1048576 || "•••"}MiB</span>
|
||||||
<br />
|
<br />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue