As a post-processing filter, your options are relatively limited. You can choose whether or not to render a photo and you can modify the photo in place (i.e. to add a watermark or change metadata). Aside from vetoing the request, you are not allowed to modify what the destination plug-in has requested (i.e. you can't change file type or file name).
Is it possible, in your case, to move this functionality into a destination plug-in?
When you ask if it is possible to move this to a desination plug-in, I assume you are referring to an export plug-in, and yes I can but since I am not a lua or LR programming expert, that is probably more effort than I will go through for this safety feature I wish to add to this plug-in.
I prefer also to keep this as a post-process as I would like to add it to a variety of types of export routines, including exporting to SmugMug which is code I cannot amend or duplicate. The feature basically takes the rendered image, fixes a couple of EXIF items (camera, model), runs it through NeatImage if necessary and so chosen, puts it in a mirrored directory structure (if so chosen), then adds to the catalog (again, if so chosen). The ability to change certain exportSettings would have allowed the plug-in to make sure certain settings are compatible with the post-processing, i.e., Neatimage needs either a TIFF or JPEG or it will bomb. Oh well.
Just curious, page 34 of the manual shows a post-process filter changing the file type to a TIFF file. I actually tried that for fun and although it does indeed change the file type to a TIFF file, it leaves the extension as ".jpg". Nothing complicated about that
In any case, you have answered my question. Thanks for the immediate response.
The example you referred to (page 34) is intended to be used when the post-processing filter needs to receive a different file type. It is still expected to produce the original file type when its done.
The use case for this is something like Tim Armes' Mogrify plug-in, which could ask for a TIFF file and then generate a JPEG when its done applying its transformations in order to avoid introducing extra JPEG artifacts.