You are here

protected function views_data_export_pdf_plugin_display_export::outputfile_create in Views Data Export PDF 7.2

Same name and namespace in other branches
  1. 7 plugins/views_data_export_pdf_plugin_display_export.inc \views_data_export_pdf_plugin_display_export::outputfile_create()

We ensure that the output file has the proper MIME type set on it at creation time.

NOTE: If you are using File Entity alongside this module, you should have a patch applied for #2570377 if you are not using a version of that module that already includes a fix for that issue. Otherwise, MIME type settings will not get saved properly.

File

plugins/views_data_export_pdf_plugin_display_export.inc, line 438
Contains the Views Data Export Display plug-in for PDF format.

Class

views_data_export_pdf_plugin_display_export
The PDF export display plug-in for Views Data Export.

Code

protected function outputfile_create() {
  $fid = parent::outputfile_create();
  $file = $this
    ->file_load($fid);
  $file->filemime = views_data_export_pdf_renderer::MIME_TYPE_HTML;
  file_save($file);
  return $fid;
}