@@ -248,6 +248,7 @@ export class FileUploadComponent implements OnInit, OnDestroy {
248248 if ( this . control ) {
249249 this . control . setValue ( this . innerValue ) ;
250250 this . control . markAsTouched ( ) ;
251+ this . control . markAsDirty ( ) ;
251252 }
252253 this . triggerSave ( ) ;
253254 }
@@ -279,6 +280,10 @@ export class FileUploadComponent implements OnInit, OnDestroy {
279280 if ( this . control && ! this . control . pristine ) {
280281 this . innerValue = this . control . value ;
281282 this . comment = this . control . value ?. comment ?? this . review . comment ;
283+ // restore uploadedFile from saved file data so template shows file after pagination
284+ if ( this . innerValue ?. file ?. url ) {
285+ this . uploadedFile = { ...this . innerValue . file , cdnUrl : this . innerValue . file . url } as TusFileResponse ;
286+ }
282287 } else {
283288 this . innerValue = {
284289 answer : this . review . answer ,
@@ -291,6 +296,10 @@ export class FileUploadComponent implements OnInit, OnDestroy {
291296 if ( ( this . submissionStatus === 'in progress' ) && ( this . doAssessment ) ) {
292297 if ( this . control && ! this . control . pristine ) {
293298 this . innerValue = this . control . value ;
299+ // restore uploadedFile from saved file data so template shows file after pagination
300+ if ( this . innerValue ?. url ) {
301+ this . uploadedFile = { ...this . innerValue , cdnUrl : this . innerValue . url } as TusFileResponse ;
302+ }
294303 } else {
295304 this . innerValue = this . submission ?. answer ;
296305 }
0 commit comments