123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- import __vite__cjsImport0_lodash from "/node_modules/.vite/deps/lodash.js?v=0e19d92d"; const set = __vite__cjsImport0_lodash["set"];
- import loading from "/src/components/Provider/Loading.tsx";
- import { message } from "/node_modules/.vite/deps/ant-design-vue.js?v=f7d2fa05";
- import __vite__cjsImport3_aliOss from "/node_modules/.vite/deps/ali-oss.js?v=a26e0da8"; const OSS = __vite__cjsImport3_aliOss.__esModule ? __vite__cjsImport3_aliOss.default : __vite__cjsImport3_aliOss;
- export class UploadController {
- request;
- blobURLMaps = /* @__PURE__ */ new Map();
- constructor(request) {
- this.request = request;
- }
- getBlobURLName(url) {
- return this.blobURLMaps.get(url)?.name;
- }
- createObjectURL(obj) {
- const url = URL.createObjectURL(obj);
- this.blobURLMaps.set(url, obj);
- return url;
- }
- revokeObjectURL(url) {
- URL.revokeObjectURL(url);
- this.blobURLMaps.delete(url);
- }
- selectFile(opts) {
- return new Promise((resolve, reject) => {
- const fileInput = document.createElement("input");
- fileInput.type = "file";
- fileInput.accept = opts?.accept || "images/*";
- fileInput.multiple = opts?.multiple || false;
- fileInput.onchange = function() {
- resolve([...this.files]);
- };
- window.addEventListener(
- "focus",
- () => {
- setTimeout(() => {
- reject(console.warn("select file cancel"));
- }, 300);
- },
- { once: true }
- );
- fileInput.click();
- });
- }
- async uploadBlobImages(data) {
- const todoMap = /* @__PURE__ */ new Map();
- addBlobToList(data);
- const todoList = todoMap.entries();
- let err = "";
- for (const item of todoList) {
- const [blobUrl, path] = item;
- const file = this.blobURLMaps.get(blobUrl);
- if (file) {
- const paths = path.split(",");
- loading.show("上传中");
- const ret = await this.uploadFiles(file);
- if (ret.url) {
- paths.forEach((p) => {
- set(data, p, ret.url);
- });
- this.revokeObjectURL(blobUrl);
- } else {
- err = ret.error || `上传文件失败[${path}]`;
- break;
- }
- } else {
- err = `上传文件为空[${path}]`;
- }
- }
- loading.hidden();
- if (err) {
- message.error(err);
- throw err;
- }
- function addBlobToList(data2, path = "") {
- if (data2 instanceof Object) {
- if (data2 instanceof Array) {
- data2.forEach((item, i) => {
- addBlobToList(item, path ? path + "." + i : i.toString());
- });
- } else {
- Object.entries(data2).forEach(([key, value]) => {
- addBlobToList(value, path ? path + "." + key : key);
- });
- }
- }
- if (typeof data2 === "string" && /^blob:/.test(data2)) {
- if (todoMap.has(data2)) {
- path = todoMap.get(data2) + "," + path;
- }
- todoMap.set(data2, path);
- }
- }
- }
- async getPolicy() {
- try {
- const res = await this.request("/upload/policy", {
- method: "GET"
- });
- console.log(res);
- if (res.errorNo != 200) {
- return { error: "获取上传签名失败!" };
- }
- const policy = res.result.body.Credentials;
- return policy;
- } catch (e) {
- return { error: "获取上传签名失败!" };
- }
- }
- async uploadFiles(file, path = "/images/") {
- const res = await this.getPolicy();
- if (res.error) {
- return res.error;
- }
- const ext = file.name.split(".");
- if (ext.length === 1)
- return { error: "上传失败!" };
- const fileExt = ext[ext.length - 1].toLowerCase();
- const fileName = this.randomName(12) + "." + fileExt;
- const client = new OSS({
- region: "oss-cn-chengdu",
- accessKeyId: res.AccessKeyId,
- accessKeySecret: res.AccessKeySecret,
- // 从STS服务获取的安全令牌(SecurityToken)。
- stsToken: res.SecurityToken,
- bucket: "baishuihu"
- });
- try {
- const options = {
- timeout: 6e5
- };
- const result = await client.put(path + fileName, file, options);
- return { url: result.url };
- } catch (e) {
- console.log(e);
- return { error: "上传失败!" };
- }
- }
- // async uploadFile(file: File): Promise<{ url?: string; error?: string }> {
- // const fromData = new FormData();
- // fromData.append("file", file);
- // try {
- // const ret = await this.request("/upload/file", {
- // method: "POST",
- // data: fromData,
- // headers: {
- // "Content-Type": "multipart/form-data",
- // },
- // });
- // if (ret.errorNo != 200) {
- // return { error: "上传失败!" };
- // }
- // const url = ret.result.url;
- // return { url };
- // } catch (e) {
- // return { error: "上传失败!" };
- // }
- // }
- getFileExt(file) {
- let ext = "unkown";
- if (file) {
- const exp = /^.+\.(.+)$/;
- if (file.name && exp.test(file.name)) {
- ext = exp.exec(file.name)[1];
- } else if (file.type) {
- ext = file.type.split("/").pop();
- }
- return ext.toLowerCase();
- } else {
- return ext;
- }
- }
- randomName(length) {
- const data = [
- "0",
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "A",
- "B",
- "C",
- "D",
- "E",
- "F",
- "G",
- "H",
- "I",
- "J",
- "K",
- "L",
- "M",
- "N",
- "O",
- "P",
- "Q",
- "R",
- "S",
- "T",
- "U",
- "V",
- "W",
- "X",
- "Y",
- "Z",
- "a",
- "b",
- "c",
- "d",
- "e",
- "f",
- "g",
- "h",
- "i",
- "j",
- "k",
- "l",
- "m",
- "n",
- "o",
- "p",
- "q",
- "r",
- "s",
- "t",
- "u",
- "v",
- "w",
- "x",
- "y",
- "z"
- ];
- let nums = "";
- for (let i = 0; i < length; i++) {
- const r = parseInt(Math.random() * 61 + "");
- nums += data[r];
- }
- return nums;
- }
- }
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlVwbG9hZENvbnRyb2xsZXIudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc2V0IH0gZnJvbSBcImxvZGFzaFwiO1xyXG5pbXBvcnQgbG9hZGluZyBmcm9tIFwiQC9jb21wb25lbnRzL1Byb3ZpZGVyL0xvYWRpbmdcIjtcclxuaW1wb3J0IHsgbWVzc2FnZSB9IGZyb20gXCJhbnQtZGVzaWduLXZ1ZVwiO1xyXG5pbXBvcnQgT1NTIGZyb20gXCJhbGktb3NzXCI7XHJcblxyXG5leHBvcnQgY2xhc3MgVXBsb2FkQ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ZGluZy5zaG93KFwi5LiK5Lyg5LitXCIpO1xyXG4gICAgICAgIGNvbnN0IHJldCA9IGF3YWl0IHRoaXMudXBsb2FkRmlsZXMoZmlsZSk7XHJcbiAgICAgICAgaWYgKHJldC51cmwpIHtcclxuICAgICAgICAgIHBhdGhzLmZvckVhY2goKHApID0+IHtcclxuICAgICAgICAgICAgc2V0KGRhdGEsIHAsIHJldC51cmwpO1xyXG4gICAgICAgICAgfSk7XHJcbiAgICAgICAgICB0aGlzLnJldm9rZU9iamVjdFVSTChibG9iVXJsKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgZXJyID0gcmV0LmVycm9yIHx8IGDkuIrkvKDmlofku7blpLHotKVbJHtwYXRofV1gO1xyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgfVxyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIGVyciA9IGDkuIrkvKDmlofku7bkuLrnqbpbJHtwYXRofV1gO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICBsb2FkaW5nLmhpZGRlbigpO1xyXG4gICAgaWYgKGVycikge1xyXG4gICAgICBtZXNzYWdlLmVycm9yKGVycik7XHJcbiAgICAgIHRocm93IGVycjtcclxuICAgIH1cclxuICAgIGZ1bmN0aW9uIGFkZEJsb2JUb0xpc3QoZGF0YTogYW55LCBwYXRoID0gXCJcIikge1xyXG4gICAgICBpZiAoZGF0YSBpbnN0YW5jZW9mIE9iamVjdCkge1xyXG4gICAgICAgIGlmIChkYXRhIGluc3RhbmNlb2YgQXJyYXkpIHtcclxuICAgICAgICAgIGRhdGEuZm9yRWFjaCgoaXRlbSwgaSkgPT4ge1xyXG4gICAgICAgICAgICBhZGRCbG9iVG9MaXN0KGl0ZW0sIHBhdGggPyBwYXRoICsgXCIuXCIgKyBpIDogaS50b1N0cmluZygpKTtcclxuICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICBPYmplY3QuZW50cmllcyhkYXRhKS5mb3JFYWNoKChba2V5LCB2YWx1ZV0pID0+IHtcclxuICAgICAgICAgICAgYWRkQmxvYlRvTGlzdCh2YWx1ZSwgcGF0aCA/IHBhdGggKyBcIi5cIiArIGtleSA6IGtleSk7XHJcbiAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgaWYgKHR5cGVvZiBkYXRhID09PSBcInN0cmluZ1wiICYmIC9eYmxvYjovLnRlc3QoZGF0YSkpIHtcclxuICAgICAgICBpZiAodG9kb01hcC5oYXMoZGF0YSkpIHtcclxuICAgICAgICAgIHBhdGggPSB0b2RvTWFwLmdldChkYXRhKSArIFwiLFwiICsgcGF0aDtcclxuICAgICAgICB9XHJcbiAgICAgICAgdG9kb01hcC5zZXQoZGF0YSwgcGF0aCk7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcbiAgYXN5bmMgZ2V0UG9saWN5KCkge1xyXG4gICAgdHJ5IHtcclxuICAgICAgY29uc3QgcmVzID0gYXdhaXQgdGhpcy5yZXF1ZXN0KFwiL3VwbG9hZC9wb2xpY3lcIiwge1xyXG4gICAgICAgIG1ldGhvZDogXCJHRVRcIixcclxuICAgICAgfSk7XHJcbiAgICAgIGNvbnNvbGUubG9nKHJlcyk7XHJcbiAgICAgIGlmIChyZXMuZXJyb3JObyAhPSAyMDApIHtcclxuICAgICAgICByZXR1cm4geyBlcnJvcjogXCLojrflj5bkuIrkvKDnrb7lkI3lpLHotKUhXCIgfTtcclxuICAgICAgfVxyXG4gICAgICBjb25zdCBwb2xpY3kgPSByZXMucmVzdWx0LmJvZHkuQ3JlZGVudGlhbHM7XHJcbiAgICAgIHJldHVybiBwb2xpY3k7XHJcbiAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgIHJldHVybiB7IGVycm9yOiBcIuiOt+WPluS4iuS8oOetvuWQjeWksei0pSFcIiB9O1xyXG4gICAgfVxyXG4gIH1cclxuICBhc3luYyB1cGxvYWRGaWxlcyhc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IkpcIixcclxuICAgICAgXCJLXCIsXHJcbiAgICAgIFwiTFwiLFxyXG4gICAgICBcIk1cIixcclxuICAgICAgXCJOXCIsXHJcbiAgICAgIFwiT1wiLFxyXG4gICAgICBcIlBcIixcclxuICAgICAgXCJRXCIsXHJcbiAgICAgIFwiUlwiLFxyXG4gICAgICBcIlNcIixcclxuICAgICAgXCJUXCIsXHJcbiAgICAgIFwiVVwiLFxyXG4gICAgICBcIlZcIixcclxuICAgICAgXCJXXCIsXHJcbiAgICAgIFwiWFwiLFxyXG4gICAgICBcIllcIixcclxuICAgICAgXCJaXCIsXHJcbiAgICAgIFwiYVwiLFxyXG4gICAgICBcImJcIixcclxuICAgICAgXCJjXCIsXHJcbiAgICAgIFwiZFwiLFxyXG4gICAgICBcImVcIixcclxuICAgICAgXCJmXCIsXHJcbiAgICAgIFwiZ1wiLFxyXG4gICAgICBcImhcIixcclxuICAgICAgXCJpXCIsXHJcbiAgICAgIFwialwiLFxyXG4gICAgICBcImtcIixcclxuICAgICAgXCJsXCIsXHJcbiAgICAgIFwibVwiLFxyXG4gICAgICBcIm5cIixcclxuICAgICAgXCJvXCIsXHJcbiAgICAgIFwicFwiLFxyXG4gICAgICBcInFcIixcclxuICAgICAgXCJyXCIsXHJcbiAgICAgIFwic1wiLFxyXG4gICAgICBcInRcIixcclxuICAgICAgXCJ1XCIsXHJcbiAgICAgIFwidlwiLFxyXG4gICAgICBcIndcIixcclxuICAgICAgXCJ4XCIsXHJcbiAgICAgIFwieVwiLFxyXG4gICAgICBcInpcIixcclxuICAgIF07XHJcbiAgICBsZXQgbnVtcyA9IFwiXCI7XHJcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxlbmd0aDsgaSsrKSB7XHJcbiAgICAgIGNvbnN0IHIgPSBwYXJzZUludChNYXRoLnJhbmRvbSgpICogNjEgKyBcIlwiKTtcclxuICAgICAgbnVtcyArPSBkYXRhW3JdO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIG51bXM7XHJc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