mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix attach document and remove file chunk from publication
This commit is contained in:
@@ -115,7 +115,7 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
component: SearchPage,
|
component: SearchPage,
|
||||||
cssClass: 'modal-width-100-width-background modal',
|
cssClass: 'modal-width-100-width-background modal',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
type: 'AccoesPresidenciais & ArquivoDespachoElect',
|
type: 'Correspondencia',
|
||||||
showSearchInput: true,
|
showSearchInput: true,
|
||||||
select: true
|
select: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
FileType: 'image'
|
FileType: 'image'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
newAttachment.needUpload();
|
//newAttachment.needUpload();
|
||||||
this.publicationFormMV.form.Files.push(newAttachment)
|
this.publicationFormMV.form.Files.push(newAttachment)
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
newAttachment.needUpload()
|
// newAttachment.needUpload()
|
||||||
this.publicationFormMV.form.Files.push(newAttachment)
|
this.publicationFormMV.form.Files.push(newAttachment)
|
||||||
this.filecontent = true;
|
this.filecontent = true;
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
const publication: any = Object.assign({}, this.publicationFormMV.form)
|
const publication: any = Object.assign({}, this.publicationFormMV.form)
|
||||||
|
|
||||||
publication.Files = publication.Files.map( (e:PublicationAttachmentEntity) => ({
|
publication.Files = publication.Files.map( (e:PublicationAttachmentEntity) => ({
|
||||||
FileBase64: e.Base64,
|
FileBase64: e.url,
|
||||||
FileExtension: e.FileExtension,
|
FileExtension: e.FileExtension,
|
||||||
OriginalFileName: e.OriginalFileName || 'foto'
|
OriginalFileName: e.OriginalFileName || 'foto'
|
||||||
}))
|
}))
|
||||||
@@ -420,7 +420,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
const publication: any = Object.assign({}, this.publicationFormMV.form)
|
const publication: any = Object.assign({}, this.publicationFormMV.form)
|
||||||
|
|
||||||
publication.Files = publication.Files.map( (e:PublicationAttachmentEntity) => ({
|
publication.Files = publication.Files.map( (e:PublicationAttachmentEntity) => ({
|
||||||
FileBase64: e.Base64,
|
FileBase64: e.url,
|
||||||
FileExtension: e.FileExtension,
|
FileExtension: e.FileExtension,
|
||||||
OriginalFileName: e.OriginalFileName || 'foto'
|
OriginalFileName: e.OriginalFileName || 'foto'
|
||||||
}))
|
}))
|
||||||
|
|||||||
@@ -148,14 +148,14 @@ export class PublicationAttachmentEntity {
|
|||||||
const sanitizer : DomSanitizer = window["sanitizer"]
|
const sanitizer : DomSanitizer = window["sanitizer"]
|
||||||
|
|
||||||
if(this.FileType == 'image' ) {
|
if(this.FileType == 'image' ) {
|
||||||
if(!this.Base64.startsWith('data:')) {
|
if(!this.Base64.includes('data:')) {
|
||||||
this.url = 'data:image/jpg;base64,' + this.Base64
|
this.url = 'data:image/jpg;base64,' + this.Base64
|
||||||
// this.url = sanitizer.bypassSecurityTrustUrl('data:image/jpg;base64,' + this.Base64) as any
|
// this.url = sanitizer.bypassSecurityTrustUrl('data:image/jpg;base64,' + this.Base64) as any
|
||||||
} else {
|
} else {
|
||||||
this.url = this.Base64
|
this.url = this.Base64
|
||||||
}
|
}
|
||||||
} else if (this.FileType == 'video' ) {
|
} else if (this.FileType == 'video' ) {
|
||||||
if(!this.Base64.startsWith('data:') && !this.Base64.startsWith('http')) {
|
if(!this.Base64.includes('data:') && !this.Base64.startsWith('http')) {
|
||||||
this.url = 'data:video/mp4;base64,' + this.Base64
|
this.url = 'data:video/mp4;base64,' + this.Base64
|
||||||
// this.url = sanitizer.bypassSecurityTrustUrl('data:video/mp4;base64,' + this.Base64) as any
|
// this.url = sanitizer.bypassSecurityTrustUrl('data:video/mp4;base64,' + this.Base64) as any
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user