Forum


Replies: 1   Views: 3933
File type issue
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by lewisrblack  · 17-02-2016 - 15:34

When I return the type of a generated docx file, using the following;

$finfo = finfo_open(FILEINFO_MIME_TYPE);
$type = finfo_file($finfo, $filepath);

It returns application/zip

When I run the same code on a docx generated from microsoft word, i get;

application/vnd.openxmlformats-officedocument.wordprocessingml.document

This is causing me issues, as I am posting the generated files to a third party API which is rejecting the docx file generated using PHPDocx. Is there any way around this?