亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何使用 Node.js 從 Cloudinary 檢索圖像 url?

如何使用 Node.js 從 Cloudinary 檢索圖像 url?

慕標5832272 2022-07-08 15:56:21
我使用 Cloudinary 將圖像上傳到 cloudinary,cloudinary.uploader.upload(image, public_id:, function(error, result){console.log(result)})然后給我上傳的圖像的圖像 url。有沒有辦法只使用我的云名稱、api 密鑰和圖像的 public_id 從 Cloudinary 檢索圖像 url?
查看完整描述

1 回答

?
ABOUTYOU

TA貢獻1812條經驗 獲得超5個贊

要直接通過 Node JS 生成 Cloudinary URL,可以使用 cloudinary.url 函數。它接受以下內容:


// cloudinary.url("<public_id>.<format>", {<transformations>})  

// Example

cloudinary.url("sample.jpg", {width: 100, height: 150, crop: "fill"})

// Output: "https://res.cloudinary.com/demo/image/upload/w_100,h_150,c_fill/sample.jpg"

來源:https ://cloudinary.com/documentation/node_image_manipulation#direct_url_building


查看完整回答
反對 回復 2022-07-08
  • 1 回答
  • 0 關注
  • 131 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號