Fix incorrect view counter bug
This commit is contained in:
parent
9df175d941
commit
af1a53c519
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ class DownloadController {
|
||||||
for (let f of file) {
|
for (let f of file) {
|
||||||
if (f.endsWith('.mp4') || f.endsWith('.webm')) {
|
if (f.endsWith('.mp4') || f.endsWith('.webm')) {
|
||||||
// Send file name, file size in MB relative path for the file
|
// Send file name, file size in MB relative path for the file
|
||||||
files.push({ name: f, size: (fs.statSync(`./public/uploads/${f}`).size / 1000000.0).toFixed(2), location: `uploads/${f}` });
|
files.push({ name: f, size: (fs.statSync(`./public/uploads/${f}`).size / 1000000.0).toFixed(2), location: `uploads/${f}`, img: '' });
|
||||||
} else if (f.endsWith('.mp3') || f.endsWith('.flac')) {
|
} else if (f.endsWith('.mp3') || f.endsWith('.flac')) {
|
||||||
// Send file name, file size in MB relative path for the file and relative path of music.png
|
// Send file name, file size in MB relative path for the file and relative path of music.png
|
||||||
files.push({ name: f, size: (fs.statSync(`./public/uploads/${f}`).size / 1000000.0).toFixed(2), location: `uploads/${f}`, img: `/asset/music.png` });
|
files.push({ name: f, size: (fs.statSync(`./public/uploads/${f}`).size / 1000000.0).toFixed(2), location: `uploads/${f}`, img: `/asset/music.png` });
|
||||||
|
|
Loading…
Reference in a new issue