upload.js 575 B

1234567891011121314151617181920212223
  1. function o(n, t) {
  2. const a = window.$utils.env.VITE_APP_PORTAL_SERVER_NAME, i = new FormData();
  3. i.append("path", n);
  4. for (let e = 0; e < t.length; e++)
  5. i.append("files", t[e], t[e].name);
  6. return window.$utils.http({
  7. url: `${a}/ftpFile/batchFileSave`,
  8. data: i,
  9. headers: {
  10. "Content-Type": "multipart/form-data"
  11. }
  12. });
  13. }
  14. function l(n, t) {
  15. const a = window.$utils.env.VITE_APP_PORTAL_SERVER_NAME;
  16. return window.$utils.http({
  17. url: `${a}/ftpFile/delete?path=${n}&imageUrl=${encodeURIComponent(t)}`
  18. });
  19. }
  20. export {
  21. o as b,
  22. l as d
  23. };