This commit is contained in:
Viet An
2026-05-14 15:37:58 +07:00
parent 4d37397ee4
commit 1f44f9e6bf
17 changed files with 670 additions and 324 deletions

View File

@@ -107,7 +107,7 @@ export default defineNuxtPlugin((nuxtApp) => {
};
const upload = function (file, type, user, convert, quality) {
var fileFormat = [
const fileFormat = [
{
type: "image",
format: [".png", ".jpg", "jpeg", ".bmp", ".gif", ".svg", ".webp"],
@@ -117,7 +117,7 @@ export default defineNuxtPlugin((nuxtApp) => {
format: [".wmv", ".avi", ".mp4", ".flv", ".mov", ".mpg", ".amv", ".rm"],
},
];
var valid = undefined;
let valid = undefined;
if (type === "image" || type === "video") {
valid = false;
let found = fileFormat.find((v) => v.type === type);