[ACA-4423] VIEWER - when closing the upload dialog the filename changes to "Unknown" (#7024)

* fix blob type instead of image

* set new crop

* improve test

* removed onchanges watcher
This commit is contained in:
Urse Daniel
2021-05-14 17:22:06 +03:00
committed by GitHub
parent 2b9535e90c
commit afd3a7c93d
2 changed files with 24 additions and 6 deletions

View File

@@ -694,8 +694,8 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
}
onSubmitFile(newImageBlob: Blob) {
const newImageFile: File = new File([newImageBlob], this?.nodeEntry?.entry?.name, { type: this?.nodeEntry?.entry?.content?.mimeType });
if (this?.nodeEntry?.entry?.id && !this.readOnly) {
const newImageFile: File = new File([newImageBlob], this?.nodeEntry?.entry?.name, { type: this?.nodeEntry?.entry?.content?.mimeType });
const newFile = new FileModel(
newImageFile,
{
@@ -706,7 +706,6 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
},
this?.nodeEntry?.entry?.id
);
this.blobFile = newImageBlob;
this.uploadService.addToQueue(...[newFile]);
this.uploadService.uploadFilesInTheQueue();
}