mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
cropp bug solved
This commit is contained in:
@@ -787,18 +787,8 @@ export class NewPublicationPage implements OnInit {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
console.log('shared base', content.data)
|
console.log('shared base', content.data)
|
||||||
|
this.capturedImage = 'data:image/jpeg;base64,' + this.removeTextBeforeSlash(content.data, ',');
|
||||||
const newAttachment = new PublicationAttachmentEntity(
|
this.showCroppModal()
|
||||||
{
|
|
||||||
base64: this.removeTextBeforeSlash(content.data, ','),
|
|
||||||
extension: FileExtension,
|
|
||||||
FileType: this.checkFileType.checkFileType(FileExtension) as any,
|
|
||||||
OriginalFileName: 'shared'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
this.PublicationFromMvService.form.Files.push(newAttachment)
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('error shared filesystem', error)
|
console.log('error shared filesystem', error)
|
||||||
}
|
}
|
||||||
@@ -824,7 +814,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
const newAttachment = new PublicationAttachmentEntity(
|
const newAttachment = new PublicationAttachmentEntity(
|
||||||
{
|
{
|
||||||
base64: 'data:video/mp4;base64,' + this.removeTextBeforeSlash(content.data, ','),
|
base64: content.data,
|
||||||
extension: 'mp4',
|
extension: 'mp4',
|
||||||
FileType: this.checkFileType.checkFileType('mp4') as any,
|
FileType: this.checkFileType.checkFileType('mp4') as any,
|
||||||
OriginalFileName: 'shared'
|
OriginalFileName: 'shared'
|
||||||
@@ -864,16 +854,8 @@ export class NewPublicationPage implements OnInit {
|
|||||||
Filesystem.readFile({ path: resultUrl }).then(async (content) => {
|
Filesystem.readFile({ path: resultUrl }).then(async (content) => {
|
||||||
try {
|
try {
|
||||||
if (this.checkFileType.checkFileType(FileExtension) == 'image') {
|
if (this.checkFileType.checkFileType(FileExtension) == 'image') {
|
||||||
let newAttachment = new PublicationAttachmentEntity(
|
this.capturedImage = 'data:image/jpeg;base64,' + this.removeTextBeforeSlash(content.data, ',');
|
||||||
{
|
this.showCroppModal()
|
||||||
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)
|
|
||||||
|
|
||||||
} else if (this.checkFileType.checkFileType(FileExtension) == 'video') {
|
} else if (this.checkFileType.checkFileType(FileExtension) == 'video') {
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
this.convertBlobToBase64(blobFile.blob).then((value: string) => {
|
this.convertBlobToBase64(blobFile.blob).then((value: string) => {
|
||||||
|
|
||||||
this.filesSizeSum = this.filesSizeSum + blobFile.size
|
this.filesSizeSum = this.filesSizeSum + blobFile.size
|
||||||
this.capturedImage = this.removeTextBeforeSlash(value, ','),
|
this.capturedImage = 'data:image/jpeg;base64,' + this.removeTextBeforeSlash(value, ','),
|
||||||
this.showCroppModal();
|
this.showCroppModal();
|
||||||
this.filecontent = true;
|
this.filecontent = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user