add logic to create folder

This commit is contained in:
GMrrc 2024-11-18 15:17:24 +01:00
parent 46cfd49bca
commit 3ff323ae71
3 changed files with 3 additions and 3 deletions

View File

@ -980,7 +980,7 @@ __webpack_require__.r(__webpack_exports__);
try { try {
const client = (0,_nextcloud_files_dav__WEBPACK_IMPORTED_MODULE_0__.getClient)(); const client = (0,_nextcloud_files_dav__WEBPACK_IMPORTED_MODULE_0__.getClient)();
const filePath = `/files/admin${this.current_dir}/${this.newFileName}`; const filePath = `/files/admin${this.current_dir}/${this.newFileName}`;
await client.createFile(filePath, ''); await client.createDirectory(filePath, '');
this.newFileName = ''; this.newFileName = '';
this.isAddFilePopupVisible = false; this.isAddFilePopupVisible = false;
await this.fetchFiles(); await this.fetchFiles();

File diff suppressed because one or more lines are too long

View File

@ -184,7 +184,7 @@ export default {
try { try {
const client = getClient(); const client = getClient();
const filePath = `/files/admin${this.current_dir}/${this.newFileName}`; const filePath = `/files/admin${this.current_dir}/${this.newFileName}`;
await client.createFile(filePath, ''); await client.createDirectory(filePath, '');
this.newFileName = ''; this.newFileName = '';
this.isAddFilePopupVisible = false; this.isAddFilePopupVisible = false;
await this.fetchFiles(); await this.fetchFiles();