Product Overview
Features and Strengths
Use Cases
System Limits
//Step one: introduce the Web SDK.import tcb from "@cloudbase/js-sdk";//Step two: perform initialization.const app = tcb.init({env: "your-env-id"});/**Step three: login authentication process. The code is omitted here. See:https://www.tencentcloud.com/document/product/876/41728?from_cn_redirect=1*/app.downloadFile({fileID: "cloud://a/b/c"}).then((res) => {console.log(res);});
// First, use wx.cloud.init for initialization. There is no need to import the SDK again on the Mini Program side, and authentication is not required.wx.cloud.downloadFile({fileID: "cloud://a/b/c" // File ID}).then((res) => {// Return a temporary file path.console.log(res.tempFilePath);});
const tcb = require("@cloudbase/node-sdk");const app = tcb.init({env: "your-env-id"});app.downloadFile({fileID: "cloud://a/b/c"}).then((res) => {// fileContent is of type Buffer.console.log(res.fileContent);});
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários