Details
-
Bug
-
Resolution: Duplicate
-
Medium
-
None
-
3.6.11, 3.7.9, 3.8.6, 3.9.0
-
None
Description
When doing imports from a cronjob, i use the following syntax for importing a file to a binary-file-datatype:
$result=array();
$status = $dataMap['file']->insertRegularFile( $contentObject,
$contentObjectVersion,
$objectLanguage,
$filename,
$result );
This results in the file uploaded (import.pdf) being called something like:
/var/ezwebin_site/storage/original/application/a0cf731ab72289d566bb509d3c5cc080
This causes problems in search indexing of PDF, because it needs the extension to do search indexing. See the example here:
http://ez.no/community/articles/indexing_multiple_binary_file_types/creating_the_file_parser_plugin
However when i upload the file in the administration interface, the .pdf extension is preserved, and the file will be called something like:
/var/ezwebin_site/storage/original/application/a0cf731ab72289d566bb509d3c5cc080.pdf
This seems like a bug in kernel/classes/datatypes/ezbinaryfile/ezbinaryfiletype.php:insertRegularFile()
The attached patch points out where the extension is found when uploading from the admin-interface, and fixes adds the extension in insertRegularFile()
Steps to reproduce
Send me an email, and i will provide the full code for the import.
Attachments
Issue Links
- duplicates
-
EZP-9450 Wevdav - creating objects based on mime type corrupts file download url
- Closed