naive-upload
Version:
<p align="left"> <a href="https://www.npmjs.org/package/naive-upload"> <img src="https://img.shields.io/npm/v/naive-upload.svg"> </a> <a href="https://bundlephobia.com/package/naive-upload@latest"> <img src="https://img.shields.io/bundl
46 lines (45 loc) • 1.58 kB
JavaScript
var r = Object.defineProperty;
var i = (t, s, n) => s in t ? r(t, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[s] = n;
var e = (t, s, n) => (i(t, typeof s != "symbol" ? s + "" : s, n), n);
import { FileType as l } from "./FileType.js";
import o from "../Extention/FileTypeHelper.js";
class u {
constructor(s) {
e(this, "rawIndex");
e(this, "name");
e(this, "newName");
e(this, "extension");
e(this, "fullname", () => {
var s, n;
return `${(s = this.name) != null ? s : ""}${(n = this.extension) != null ? n : ""}`;
});
e(this, "extensionLower");
e(this, "size", "");
e(this, "fileType", l.\u672A\u77E5);
e(this, "thumbnail", "/filetypes/empty.png");
e(this, "class", []);
e(this, "checking", !1);
e(this, "checked", !1);
e(this, "uploading", !1);
e(this, "uploaded", !1);
e(this, "done", !1);
e(this, "reTry", 0);
e(this, "error", !1);
e(this, "errorMessage");
e(this, "percent", 0);
e(this, "virtualPercent", 0);
e(this, "percentBeforPaused", 0);
e(this, "virtualPercentBeforPaused", 0);
e(this, "paused", !1);
e(this, "canceled", !1);
e(this, "token");
e(this, "echo", !1);
var a;
const n = s.name.lastIndexOf(".");
this.name = s.name.substring(0, n), this.extension = s.name.substring(n), this.extensionLower = (a = this.extension) == null ? void 0 : a.toLowerCase(), this.fileType = s.type ? o.getByMIME(s.type) : o.getByExtension(this.extension);
}
}
export {
u as default
};
//# sourceMappingURL=SelectedFile.js.map