From 3f33924d4a18d6a18b57e94a7bb8d514b42270c6 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 21 Nov 2011 06:24:19 -0400 Subject: [PATCH] Updated document mode to pass the document mimetype when calling convert to avoid a chain of mimetype detections --- apps/documents/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/documents/models.py b/apps/documents/models.py index 6272e5635b..97d5c848d8 100644 --- a/apps/documents/models.py +++ b/apps/documents/models.py @@ -250,7 +250,7 @@ class Document(models.Model): return cache_file_path else: document_file = document_save_to_temp_dir(self, self.checksum) - return convert(document_file, output_filepath=cache_file_path, page=page, transformations=transformations) + return convert(document_file, output_filepath=cache_file_path, page=page, transformations=transformations, mimetype=self.file_mimetype) def get_valid_image(self, size=DISPLAY_SIZE, page=DEFAULT_PAGE_NUMBER, zoom=DEFAULT_ZOOM_LEVEL, rotation=DEFAULT_ROTATION): image_cache_name = self.get_image_cache_name(page=page)