API UploadField functions on new records

Fixed regression from 1e5d40474d43ddb0ade22bbf7db5ec494b979fea (UploadField::canPreviewFolder).
Merged in pull request #2009 - (6018bdd631ec98345bba5cd26ef5a29f6f412678).
Merged pull request #1259 (34bfc862eee061ce30998a085aac6170022c3a7e).