Eueno
  • EUENO – Decentralized Encrypting Blockchain Oracles for Web3
    • Litepaper
    • Use Cases
  • Get Started
    • Prerequisites
    • Buckets
      • Create a bucket
      • Delete a bucket
    • Files
      • Upload a file
      • View a file
      • Delete a file
      • Share a file
  • Pricing
  • Eueno libraries
    • @eueno/lib-browser
      • Installation
      • Setup
      • Create key (generate a key for encrypting the file(s))
      • login()
      • useEuenoContext()
      • getUserInfo()
      • updateUserInfo()
      • createProject()
      • getProjectInfo()
      • getProjects()
      • getFilesListByFolder()
      • deleteProject()
      • createFolder()
      • uploadFolder()
      • Get folder detail
      • deleteFolder()
      • uploadFile()
      • uploadFileWithSignedUrl()
      • getCid()
      • getFileById()
      • getFileListById()
      • Get file detail
        • getDetailFile()
        • getDetailUnencryptedFile()
        • getDetailEncryptedFile()
      • getDetailMultiEncryptedFiles()
      • deleteFile()
      • shareFile()
      • shareMultiFile()
      • deleteSharePermission()
      • getShareList()
      • getShareListToMe ()
    • @eueno/lib-node
      • Create eueno client
      • Create project key
      • Create project
      • Upload file
      • Upload folder
      • Get file
      • Get list file
      • Share file
      • Get shared files
      • Create folder
      • Create Account
      • Decrypt Get Key Aes
      • Decrypt File by Key Aes
  • Policies
    • Privacy Policy
    • Terms of Service
Powered by GitBook
On this page
  • Syntax
  • Parameters
  • Example
  1. Eueno libraries
  2. @eueno/lib-browser

deleteFolder()

Syntax

deleteFolder(projectId: string, folderPath: string, token?: string)

Delete a folder in the project.

Parameters

Name
Type
Required
Description

projectId

string

Yes

The project ID.

folderPath

string

Yes

The path to access the folder that you want to delete. For example, if you want to delete the folder “Profile" in “NewFolder", the path will be like this: "NewFolder/Profile".

token

string

No

The authentication token response from Eueno API when login. After login, this token was saved in local storage with the name “eueno-token".

Example

import { deleteFolder } from "@eueno/lib-browser";
 
const onDelete = async () => {
   if (!token) return toast.error("Token null!");
   try {
         const projectId = "112";
         const path = "NewFolder/Profile";
         const res = await deleteFolder(projectId, path);
       
     if (res.status === 200) {
       console.log("Delete successfully");
     }
   } catch (error) {
     console.error(error);
   }
 };

Response of example:

{"msg":"success"}
PreviousGet folder detailNextuploadFile()

Last updated 2 years ago