문제

I've been using the latest PHP SDK and have managed to create a simple script (https://gist.github.com/nickweavers/9936267) to create a container, upload objects into it, list and view them. But Can someone tell me if the SDK is able to figure out the mime types of files that are uploaded and make that info available to us or do we need to store it in the file objects meta data? At the moment my test script has a header("Content-Type: application/pdf"); hard coded, and I would like to handle this automatically.

TIA, Nick

도움이 되었습니까?

해결책

CloudFiles should be detecting the content type for you (by extension), as long as you don't explicitly state the type.

To make sure it detects the right content type on subsequent POSTs or PUTs, set X-Detect-Content-Type: True.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top