Answers for "how to write code to delete a file from public folder server in express js"

5

delete with unlinksync node

const fs = require('fs')

const path = './file.txt'

try {
  fs.unlinkSync(path)
  //file removed
} catch(err) {
  console.error(err)
}
Posted by: Guest on July-02-2020

Code answers related to "how to write code to delete a file from public folder server in express js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language