【发布时间】:2017-03-18 12:05:27
【问题描述】:
考虑使用 Cloudinary PHP API 上传文件:
\Cloudinary\Uploader::upload('http://www.example.com/image.jpg');
如in the doumentation所述,基本响应不包括上传文件的mime-type:
Array
(
[public_id] => c87hg9xfxrd4itiim3t0
[version] => 1371995958
[signature] => f8645b000be7d717599affc89a068157e4748276
[width] => 864
[height] => 576
[format] => jpg
[resource_type] => image
[created_at] => 2013-06-23T13:59:18Z
[bytes] => 120253
[type] => upload
[url] => http://res.cloudinary.com/demo/image/upload/v1371995958/c87hg9xfxrd4itiim3t0.jpg
[secure_url] => https://res.cloudinary.com/demo/image/upload/v1371995958/c87hg9xfxrd4itiim3t0.jpg
)
我是否必须在设置中配置某些内容才能将其添加到响应中?
【问题讨论】:
-
除了已经返回的
format之外,您能否分享一些关于为什么需要 mime 类型的更多信息?
标签: php file-upload mime-types cloudinary