簡體   English   中英

將base64哈希圖像上傳到Cloudinary

[英]Uploading base64 hashed image to Cloudinary

有沒有一種方法可以將圖像作為base64哈希上傳到Cloudinary? 我找不到PHP上傳器庫的參數。

Cloudinary's upload API call accepts the following options:

file - The resource to upload. Can be one of the following:
A local path (e.g., '/home/my_image.jpg').
An HTTP URL of a resource available on the Internet (e.g., 'http://www.example.com/image.jpg').
A URL of a file in a private S3 bucket white-listed for your account (e.g., 's3://my-bucket/my-path/my-file.jpg')

在這里說: http : //cloudinary.com/documentation/php_image_upload

Cloudinary支持使用圖像的base64編碼數據上傳文件。 您應確保按照以下說明將內容作為Data-URI發送: http : //en.wikipedia.org/wiki/Data_URI_scheme

例如在PHP中:

\Cloudinary\Uploader::upload("data:image/jpeg;base64...")

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM