No filename validation for XML and PDF wholebook converted files
As discussed with @lathrops1, we do not want filename validation on converted files in the PDF and XML wholebook workflows. That is consistent with how NCBI's test site currently works, but requires further development on Coko's side to refine the behaviour introduced in Coko's test site during development. Instead of validating converted filenames for PDF and XML wholebooks, we will validate only the file extension as per #986 (closed).
This means converted files in PDF and XML wholebooks can have unique names and can be replaced accurately by a converted file with a different name, and the latest file uploaded will be sent for the preview (in technical terms this will always be the latest file version, but for NCBI's purposes this is not distinct from the last uploaded converted file).
File versioning will work as follows:
When a new converted file is uploaded, the new file's version number is incremented, unless the first file is in new upload status, in which case the first file is simply replaced. In practice, this means that regardless of status, the latest uploaded converted file is sent for the preview.
For example:
- Upload [filename 1].xml/bxml, which becomes v1.1
- Send [filename 1].xml to preview
- [filename 1].xml v1.1 is now in previewing status
- Upload [filename 2].xml/bxml, which becomes v1.2 since v1.1 is in previewing status, and v1.2 is now in new upload status
- Upload [filename 3].xml/bxml, which replaces v1.2 since v1.2 was in new upload status
- When we load to preview v1.2 (the latest uploaded file) is sent.
The same behaviour applies whether the converted file is received via FTP, from the conversion service, or manually uploaded by a System admin in the UI.
@lathrops1 please confirm that further changes outside of this scope are not required for wholebook filename validation.