Exa Protocol Documentation
Exa Protocol Documentation
Exa Protocol Documentation
  • Getting Started with ExaDrive SDK
    • Introduction
    • Install SDK
    • Upload Files
    • Update File
    • Get Files
    • Delete Files
    • Best Practices
  • ExaDrive Dashboard
    • Introduction
    • Create an App
    • Connect Your Domain to Your App
    • Using a Bucket
      • Upload a File
    • Use the File in Your Project
    • Billing
    • Settings
  • GETTING STARTED WITH EXACOMPUTE
    • Introduction
    • Rent Your Machine
    • Activate Your Rented Machine
    • View Your Machines & Earnings
  • ExaCompute Desktop App
    • Introduction
    • Download and Install Desktop App
    • Connect your machine to the Exa Network
Powered by GitBook
On this page
Edit on GitHub
  1. Getting Started with ExaDrive SDK

Update File

The updateFile function allows you to update an existing file's public CDN availability in your ExaDrive storage. You can enable or disable it.

exaDrive.updateFile(virtualFilePath: string, enableCDN: boolean)
  .then(response => {
    console.log('File updated successfully:', response);
  })
  .catch(error => {
    console.error('Error updating file:', error);
  });
  • Parameters:

    • virtualFilePath: The virtual path of the file you want to update.

    • enableCDN: Boolean field to enable or disable the public CDN link.

Sample Response

{
  "message": "virtual-file-path",
  "enableCDN": true
}

PreviousUpload FilesNextGet Files

Last updated 7 months ago