done chunk upload

This commit is contained in:
Peter Maquiran
2024-02-08 10:14:21 +01:00
parent 60edd1ca01
commit 0e383c85a8
5 changed files with 31 additions and 61 deletions
@@ -430,8 +430,6 @@ export class NewPublicationPage implements OnInit {
if (this.publicationType == ActionType.edit) {
if (this.seletedContent.length >= 1) {
const loader = this.toastService.loading()
@@ -459,8 +457,6 @@ export class NewPublicationPage implements OnInit {
return e
})
console.log("this.publication.Files", this.publication.Files)
}
this.publication.Files = this.publication.Files.map( (e: PublicationAttachmentEntity) => ({
@@ -481,7 +477,7 @@ export class NewPublicationPage implements OnInit {
this.httpErroHandle.httpStatusHandle(error)
if (error.status == 404) {
this.PublicationFolderService.deletePost(this.publication.ProcessId, this.publication.DocumentId)
//this.goBack();
this.goBack();
}
} finally {
loader.remove()
@@ -512,14 +508,13 @@ export class NewPublicationPage implements OnInit {
const upload = await this.publicationFormMV.uploadVideosFiles()
if(upload) {
this.publication.Files = this.publication.Files.map((e:PublicationAttachmentEntity)=> {
this.publication.Files = this.publication.Files.map((e:PublicationAttachmentEntity) => {
if(e.FileType == 'video') {
e.OriginalFileName = e.chucksManager.path.replace(".mp4", "")
e.FileExtension = "mp4"
e.Base64 = ""
}
alert("commit")
this.publicationFormMV.ObjectMergeNotification.socket.commit(e.chucksManager.path)
return e
@@ -550,7 +545,7 @@ export class NewPublicationPage implements OnInit {
this.httpErroHandle.httpsSucessMessagge('Editar publicação')
}
//this.goBackToViewPublications.emit();
this.goBackToViewPublications.emit();
} catch (error) {
this.httpErroHandle.httpStatusHandle(error)
} finally {
@@ -568,11 +563,11 @@ export class NewPublicationPage implements OnInit {
}
// this.publicationFormMV.ObjectMergeNotification.close()
this.publicationFormMV.ObjectMergeNotification.close()
}
ngOnDestroy() {
// this.publicationFormMV.ObjectMergeNotification.close()
this.publicationFormMV.ObjectMergeNotification.close()
}
close() {