What should be passed in to delete Aliyun oss?


delete:

var co = require("co");
var OSS = require("ali-oss")
var client = new OSS({
  region: "<Your region>",
  accessKeyId: "<Your AccessKeyId>",
  accessKeySecret: "<Your AccessKeySecret>",
  bucket: "Your bucket name"
});
co(function* () {
  var result = yield client.delete("object-key");
  console.log(result);
}).catch(function (err) {
  console.log(err);
});

above is the code for deleting files in Aliyun oss nodejs sdk. I would like to ask you what the object-key passed in should be? I passed in the file address on oss and cannot delete it.

Mar.18,2021

it is recommended to take a look at introduction to basic concepts . Object-key is the only key,URL that stores files, which is used for access and sharing. If you manage files, you certainly won't use them, just as you delete server files and you won't delete them by URL. Just think of OSS as a file system.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf2a32-3116f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf2a32-3116f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?