Closed mark-dce closed 6 years ago
Supercedes #86
I'm not sure how to test that the thumbnail is the first page of the spreadsheet, but I have a PR almost ready to go that might suffice for the rest, and would love a review to find out if does. It tests adding a pdf to a work with a jpg , and creating a work with an xlsx and two pdfs, and that the representative media settings are preserved in both cases.
I don't think we need to test the first page of the spreadsheet - that was me basically saying we should do a quick check that we're not passing any funky parameters to ImageMagick. I think the test is just that the spreadsheet is the thing used to generate the thumbnail - the "first sheet" part of the requirement is overkill.
STORY As a curator, I do not want the thumbnail or representative of a work to change when I attach additional files, so that my explicit choices about representatives & thumbnails are persistent until I explicitly change them.
ACCEPTANCE
EXAMPLES 1) A new ETD is created and the user uploads a single JPEG with it. The JPEG should be set as the thumbnail and remain that way even if the user later attaches a PDF 2) A new ETD is created and the user selects a Spreadsheet, a PDF, and another PDF, in that order and uploader them, then the thumbnail should be the first page of the spreadsheet 3) A new ETD is created and the selects PDF4, PDFA, and PDFB in that order, then PDF4 should be the thumbnail and representative media