mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
diplmas signaure solved
This commit is contained in:
@@ -252,7 +252,7 @@ export class NewPublicationPage implements OnInit {
|
||||
.then(async (content) => {
|
||||
this.filecontent = true;
|
||||
let fileObject = {
|
||||
FileBase64: content.data,
|
||||
FileBase64: 'data:video/mp4;base64,'+content.data,
|
||||
FileExtension: 'mp4',
|
||||
OriginalFileName: 'video'
|
||||
}
|
||||
@@ -292,11 +292,21 @@ export class NewPublicationPage implements OnInit {
|
||||
console.log(result)
|
||||
console.log(content)
|
||||
this.filecontent = true;
|
||||
let fileObject = {
|
||||
FileBase64: content.data,
|
||||
FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
|
||||
OriginalFileName: 'video'
|
||||
let fileObject;
|
||||
if(this.removeTextBeforeSlash(element.mimeType, '/') == "mp4") {
|
||||
fileObject = {
|
||||
FileBase64: 'data:video/mp4;base64,'+ content.data,
|
||||
FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
|
||||
OriginalFileName: 'video'
|
||||
}
|
||||
} else {
|
||||
fileObject = {
|
||||
FileBase64: content.data,
|
||||
FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
|
||||
OriginalFileName: 'image'
|
||||
}
|
||||
}
|
||||
|
||||
this.seletedContent.push(fileObject)
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
@@ -479,6 +489,18 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
const date = formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss')
|
||||
|
||||
/* this.seletedContent = this.seletedContent.map((e) => {
|
||||
if(e.FileExtension == "mp4") {
|
||||
return {
|
||||
FileBase64: e.FileBase64,
|
||||
FileExtension: 'data:video/mp4;base64,'+e.FileExtension,
|
||||
OriginalFileName: "video",
|
||||
}
|
||||
}
|
||||
|
||||
return e
|
||||
}) */
|
||||
|
||||
/* if (this.capturedImage != '') { */
|
||||
this.publication = {
|
||||
DateIndex: date,
|
||||
@@ -511,6 +533,8 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
try {
|
||||
|
||||
|
||||
|
||||
await this.publications.CreatePublication(this.folderId, this.publication).toPromise();
|
||||
this.close();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
||||
|
||||
Reference in New Issue
Block a user