Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!this.personsPresenceService.readOnly && this.personsPresence.selectedPerson) {
- const file = event[0];
- if (
- file.type === 'image/jpeg' ||
- file.type === 'image/png' ||
- file.type === 'image/bmp' ||
- file.type === 'image/jpg'
- ) {
- const document = {
- data: {
- name: file.name,
- document_type_id: 1007,
- traxxeo_ai_verified: 'N',
- lm_name: this.userDataService.username,
- validated: false,
- validation_date: null,
- validation_gui_user_id: null,
- validation_person: null,
- person_id: this.personsPresence.selectedPerson.person_id,
- file
- }
- };
- this.personsPresenceService
- .addAttachDoc(document, this.personsPresence.selectedPerson.person_id)
- .pipe(
- concatMap((returnedFileId: any) => {
- this.personsPresence.selectedPerson.id_image_path = returnedFileId.attach_doc_id;
- let fuckingAss = this.personsPresenceService.getPersonImageAttachDoc(returnedFileId.attach_doc_id);
- return fuckingAss;
- })
- )
- .subscribe((returnedFile) => {
- this.personsPresence.imgSrc = returnedFile;
- });
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment