mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'feature/viewer-attachment' of bitbucket.org:equilibriumito/gabinete-digital-fo into feature/viewer-attachment
This commit is contained in:
@@ -805,18 +805,8 @@ export class NewPublicationPage implements OnInit {
|
||||
try {
|
||||
|
||||
console.log('shared base', content.data)
|
||||
|
||||
const newAttachment = new PublicationAttachmentEntity(
|
||||
{
|
||||
base64: this.removeTextBeforeSlash(content.data, ','),
|
||||
extension: FileExtension,
|
||||
FileType: this.checkFileType.checkFileType(FileExtension) as any,
|
||||
OriginalFileName: 'shared'
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
this.PublicationFromMvService.form.Files.push(newAttachment)
|
||||
this.capturedImage = 'data:image/jpeg;base64,' + this.removeTextBeforeSlash(content.data, ',');
|
||||
this.showCroppModal()
|
||||
} catch (error) {
|
||||
console.log('error shared filesystem', error)
|
||||
}
|
||||
@@ -842,7 +832,7 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
const newAttachment = new PublicationAttachmentEntity(
|
||||
{
|
||||
base64: 'data:video/mp4;base64,' + this.removeTextBeforeSlash(content.data, ','),
|
||||
base64: content.data,
|
||||
extension: 'mp4',
|
||||
FileType: this.checkFileType.checkFileType('mp4') as any,
|
||||
OriginalFileName: 'shared'
|
||||
@@ -882,16 +872,8 @@ export class NewPublicationPage implements OnInit {
|
||||
Filesystem.readFile({ path: resultUrl }).then(async (content) => {
|
||||
try {
|
||||
if (this.checkFileType.checkFileType(FileExtension) == 'image') {
|
||||
let newAttachment = new PublicationAttachmentEntity(
|
||||
{
|
||||
base64: 'data:image/jpeg;base64,' + this.removeTextBeforeSlash(content.data, ','),
|
||||
extension: FileExtension,
|
||||
FileType: this.checkFileType.checkFileType(FileExtension) as any,
|
||||
OriginalFileName: 'shared'
|
||||
}
|
||||
)
|
||||
|
||||
this.PublicationFromMvService.form.Files.push(newAttachment)
|
||||
this.capturedImage = 'data:image/jpeg;base64,' + this.removeTextBeforeSlash(content.data, ',');
|
||||
this.showCroppModal()
|
||||
|
||||
} else if (this.checkFileType.checkFileType(FileExtension) == 'video') {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user