mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
upoad test
This commit is contained in:
@@ -85,7 +85,7 @@ export class NewPublicationPage implements OnInit {
|
||||
this.filecontent = true;
|
||||
}
|
||||
|
||||
// this.SocketConnectionMCRService.connect()
|
||||
this.SocketConnectionMCRService.connect()
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -416,8 +416,6 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
// this.publicationFormMV.setDataToFrom(this.publication)
|
||||
// this.publicationFormMV.uploadVideosFiles()
|
||||
|
||||
this.publication.Files = this.publication.Files.map( e => ({
|
||||
FileBase64: e.FileBase64,
|
||||
@@ -871,6 +869,27 @@ export class NewPublicationPage implements OnInit {
|
||||
this.seletedContent.splice(index, 1)
|
||||
}
|
||||
|
||||
|
||||
|
||||
uploadChunk() {
|
||||
let time = new Date()
|
||||
|
||||
this.publication = {
|
||||
DateIndex: time,
|
||||
DocumentId: null,
|
||||
ProcessId: this.folderId,
|
||||
Title: this.pub.Title,
|
||||
Message: this.pub.Message,
|
||||
DatePublication: time,
|
||||
OriginalFileName: this.capturedImageTitle || 'foto',
|
||||
Files: this.seletedContent,
|
||||
}
|
||||
|
||||
|
||||
this.publicationFormMV.setDataToFrom(this.publication)
|
||||
this.publicationFormMV.uploadVideosFiles()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// class UploadFileUseCase {
|
||||
@@ -988,7 +1007,7 @@ class UploadFileUseCase {
|
||||
const blob = new Blob([chunk]);
|
||||
const blobFile = new File([blob], "test.mp4", { type: blob.type });
|
||||
|
||||
return await this.CMAPIService.FileContent({length, path, index, blobFile})
|
||||
return await this.CMAPIService.FileContent({length, path: ChucksManager.path, index, blobFile})
|
||||
}
|
||||
|
||||
if(!ChucksManager.hasPath()) {
|
||||
@@ -998,11 +1017,12 @@ class UploadFileUseCase {
|
||||
const blob = new Blob([chuck]);
|
||||
const blobFile = new File([blob], "test.mp4", { type: blob.type });
|
||||
|
||||
const uploadRequest = await this.CMAPIService.FileContent({length, path, index: initIndex, blobFile})
|
||||
const uploadRequest = await this.CMAPIService.FileContent({length, path:ChucksManager.path, index: initIndex, blobFile})
|
||||
|
||||
if(uploadRequest.isOk()) {
|
||||
|
||||
path = uploadRequest.value.path
|
||||
path = uploadRequest.value.data
|
||||
|
||||
ChucksManager.setPath(path)
|
||||
ChucksManager.setResponse(initIndex, uploadRequest.value as any)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user