upload.js 790 B

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