+ upload = (url: string, path: string, files: File[], config: WebDAVRequestConfig = {}) => {
+ const fd = new FormData();
+ fd.append('path', path);
+ files.forEach((f, idx) => {
+ fd.append(`file-${idx}`, f);
+ });
+
+ return this.request({
+ ...config, url,
+ method: 'PUT',
+ data: fd
+ });
+ }
+