Please sign in to comment.
Fix thumbnail generation of PDF publications.
We had a problem where thumbnails weren't created correctly if the PDF was retrieved from the file cache. The problem occurred when creating a publication with an attachment where the attachment failed validation. After lots of digging we've determined that by overriding `#full_original_filename` (as well as `#full_filename`) we can get CarrierWave to do the right thing (i.e correctly generate our thumbnail when the attachment uses the file cache). We've added two tests that demonstrate the broken behaviour without the implementation of `#full_original_filename`. We've also fixed a secondary problem whereby the previous implementation of `#get_first_page_as_png` caused two thumbnail_ files to be generated - the first was the version that CarrierWave creates by default when any version is declared, and the second was the from our use of the `convert` command.
- Loading branch information...
Showing with 20 additions and 5 deletions.