diff --git a/views_pdf_plugin_display.inc b/views_pdf_plugin_display.inc index 9011078..17e6e96 100644 --- a/views_pdf_plugin_display.inc +++ b/views_pdf_plugin_display.inc @@ -515,6 +515,7 @@ class views_pdf_plugin_display extends views_plugin_display_page { if (is_writable($dir)) { $template_path = file_create_path($dir); $file = file_save_upload('template_file', array(), $template_path); + file_set_status(&$file, FILE_STATUS_PERMANENT); } diff --git a/views_pdf_plugin_row_fields.inc b/views_pdf_plugin_row_fields.inc index f945d07..7811a1a 100644 --- a/views_pdf_plugin_row_fields.inc +++ b/views_pdf_plugin_row_fields.inc @@ -360,6 +360,7 @@ class views_pdf_plugin_row_fields extends views_plugin_row { // The file field is not called "template_file" as expected, it calls // "row_options". The reason for that is not clear. $file = file_save_upload('row_options', array(), $template_path); + file_set_status(&$file, FILE_STATUS_PERMANENT); if ($file) { $form_state['values']['row_options']['template'] = $file->destination; }