Saturday 28 October 2006 8:21:31 am
I'm trying to use eZContentUpload::handleLocalFile from a cli script. Uploading works fine but the mime type is always application/octet-stream, also for images. I investigated this issue a bit and it seems that eZMimeType::findByURL always returns the default mime type because the protocol is not 'file'. In other words I have to prepend the protocol file:// to the path of my file. But when I do this, the check with file_exists() fails in eZContentUpload::handleLocalFile. Examples of paths failing:
file://F:\todo\ezpublish_migration_from_wordpress\wp-content\uploads\2006\01\me.jpg file://F:/todo/ezpublish_migration_from_wordpress/wp-content/uploads/2006/01/me.jpg I'm using PHP 4.4 on Windows XP. Bug or not? Solution? Thanks in advance for your help
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
|