mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'feature/viewer-attachment' of bitbucket.org:equilibriumito/gabinete-digital-fo into feature/viewer-attachment
This commit is contained in:
@@ -60,5 +60,5 @@
|
||||
|
||||
.desk{
|
||||
text-align: left;
|
||||
background-color: white;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
@@ -59,5 +59,5 @@
|
||||
|
||||
.desk{
|
||||
text-align: left;
|
||||
background-color: white;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
@@ -293,12 +293,13 @@ export class NewPublicationPage implements OnInit {
|
||||
console.log('load video tablet base64', content)
|
||||
this.filecontent = true;
|
||||
let fileObject = new PublicationAttachmentEntity({
|
||||
base64: content.data,
|
||||
base64: 'data:video/mp4;base64,'+content.data,
|
||||
extension: this.removeTextBeforeSlash(element.mimeType, '/'),
|
||||
OriginalFileName: 'video',
|
||||
FileType: this.checkFileType.checkFileType( this.removeTextBeforeSlash(element.mimeType, '/')) as any
|
||||
})
|
||||
|
||||
/* fileObject.needUpload() */
|
||||
this.publicationFormMV.form.Files.push(fileObject)
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
@@ -731,11 +732,12 @@ export class NewPublicationPage implements OnInit {
|
||||
data.forEach(async element => {
|
||||
this.filesSizeSum = this.filesSizeSum + element.size
|
||||
if (this.fileSizeToMB(this.filesSizeSum) <= 20) {
|
||||
if(this.platform.is('ios'))
|
||||
this.recordevideoIos(element.fullPath)
|
||||
if(this.platform.is('ios')) {
|
||||
this.recordevideoIos(element.fullPath)
|
||||
} else {
|
||||
this.recordVideoPc(element.fullPath)
|
||||
}
|
||||
} else {
|
||||
this.recordVideoPc(element.fullPath)
|
||||
|
||||
if (this.publicationFormMV.form.Files.length === 0)
|
||||
this.filesSizeSum = 0
|
||||
|
||||
@@ -776,14 +778,14 @@ console.log(stringGerada);
|
||||
this.filecontent = true;
|
||||
console.log('', content)
|
||||
let fileObject = new PublicationAttachmentEntity({
|
||||
base64: content.data,
|
||||
base64: 'data:video/mp4;base64,'+content.data,
|
||||
extension: 'mp4',
|
||||
OriginalFileName: 'record',
|
||||
FileType: 'video'
|
||||
|
||||
}
|
||||
)
|
||||
// fileObject.needUpload()
|
||||
/* fileObject.needUpload() */
|
||||
this.publicationFormMV.form.Files.push(fileObject)
|
||||
})
|
||||
.catch((erro) => console.error('read converted video erro ', erro));
|
||||
@@ -805,15 +807,27 @@ console.log(stringGerada);
|
||||
.then(async (content) => {
|
||||
this.filecontent = true;
|
||||
console.log('', content)
|
||||
let fileObject = new PublicationAttachmentEntity({
|
||||
base64: content.data,
|
||||
extension: 'mp4',
|
||||
OriginalFileName: 'record',
|
||||
FileType: 'video'
|
||||
|
||||
let fileObject;
|
||||
if(this.platform.is('desktop')) {
|
||||
|
||||
fileObject = new PublicationAttachmentEntity({
|
||||
base64: content.data,
|
||||
extension: 'mp4',
|
||||
OriginalFileName: 'record',
|
||||
FileType: 'video'
|
||||
|
||||
})
|
||||
} else {
|
||||
fileObject = new PublicationAttachmentEntity({
|
||||
base64: 'data:video/mp4;base64,'+content.data,
|
||||
extension: 'mp4',
|
||||
OriginalFileName: 'record',
|
||||
FileType: 'video'
|
||||
|
||||
})
|
||||
}
|
||||
)
|
||||
// fileObject.needUpload()
|
||||
|
||||
/* fileObject.needUpload() */
|
||||
this.publicationFormMV.form.Files.push(fileObject)
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { Publication } from 'src/app/models/publication';
|
||||
import { NewPublicationPage } from 'src/app/pages/publications/new-publication/new-publication.page';
|
||||
import { NewPublicationPage } from 'src/app/shared/publication/new-publication/new-publication.page';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
Reference in New Issue
Block a user