mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
serializing url
This commit is contained in:
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
|
||||
import { ok, err, Result } from 'neverthrow';
|
||||
import { ObjectMergeNotification } from 'src/app/services/socket-connection-mcr.service';
|
||||
import { CMAPIService } from "src/app/shared/repository/CMAPI/cmapi.service"
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
const objectMergeNotification = new ObjectMergeNotification()
|
||||
|
||||
@@ -16,7 +17,12 @@ export type IOUploadError = "noConnection" | "slow"
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class UploadStreamingService {
|
||||
constructor( private CMAPIService: CMAPIService,) { }
|
||||
constructor(
|
||||
private CMAPIService: CMAPIService,
|
||||
private sanitizer: DomSanitizer
|
||||
) {
|
||||
window["sanitizer"] = this.sanitizer
|
||||
}
|
||||
}
|
||||
|
||||
class UploadFileUseCase {
|
||||
@@ -109,6 +115,8 @@ export class PublicationAttachmentEntity {
|
||||
}
|
||||
|
||||
fixFileBase64() {
|
||||
//const sanitizer : DomSanitizer = window["sanitizer"]
|
||||
|
||||
if(this.FileType == 'image' ) {
|
||||
if(!this.Base64.startsWith('data:')) {
|
||||
this.url = 'data:image/jpg;base64,' + this.Base64
|
||||
|
||||
Reference in New Issue
Block a user