mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
change message
This commit is contained in:
@@ -441,7 +441,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.toastService._badRequest("É necessário adicionar anexo")
|
this.toastService._badRequest("É necessário adicionar uma imagem ou vídeo")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -486,7 +486,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.toastService._badRequest("É necessário adicionar anexo")
|
this.toastService._badRequest("É necessário adicionar uma imagem ou vídeo")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.toastService._badRequest("É necessário adicionar um anexo")
|
this.toastService._badRequest("É necessário adicionar uma imagem ou vídeo")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.toastService._badRequest("É necessário adicionar um anexo")
|
this.toastService._badRequest("É necessário adicionar uma imagem ou vídeo")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -963,26 +963,12 @@ class UploadFileUseCase {
|
|||||||
let path: string;
|
let path: string;
|
||||||
const length = ChucksManager.chunks.totalChunks.toString()
|
const length = ChucksManager.chunks.totalChunks.toString()
|
||||||
|
|
||||||
function makeFrom({blobFile, index, path}) {
|
|
||||||
|
|
||||||
const formData = new FormData();
|
|
||||||
|
|
||||||
formData.append("blobFile", blobFile);
|
|
||||||
formData.append("length", length);
|
|
||||||
formData.append("index", index.toString());
|
|
||||||
formData.append("path", path);
|
|
||||||
|
|
||||||
return formData
|
|
||||||
}
|
|
||||||
|
|
||||||
const readAndUploadChunk = async(index: number) => {
|
const readAndUploadChunk = async(index: number) => {
|
||||||
|
|
||||||
const chunk = await ChucksManager.chunks.getChunks(index)
|
const chunk = await ChucksManager.chunks.getChunks(index)
|
||||||
const blob = new Blob([chunk]);
|
const blob = new Blob([chunk]);
|
||||||
const blobFile = new File([blob], "test.mp4", { type: blob.type });
|
const blobFile = new File([blob], "test.mp4", { type: blob.type });
|
||||||
|
|
||||||
const form = makeFrom({blobFile, index, path})
|
|
||||||
|
|
||||||
return await this.LakefsRepositoryService.FileContent({length, path, index, blobFile})
|
return await this.LakefsRepositoryService.FileContent({length, path, index, blobFile})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -992,7 +978,6 @@ class UploadFileUseCase {
|
|||||||
const chuck = await ChucksManager.chunks.getChunks(initIndex)
|
const chuck = await ChucksManager.chunks.getChunks(initIndex)
|
||||||
const blob = new Blob([chuck]);
|
const blob = new Blob([chuck]);
|
||||||
const blobFile = new File([blob], "test.mp4", { type: blob.type });
|
const blobFile = new File([blob], "test.mp4", { type: blob.type });
|
||||||
const form = makeFrom({blobFile, index: initIndex, path})
|
|
||||||
|
|
||||||
const uploadRequest = await this.LakefsRepositoryService.FileContent({length, path, index: initIndex, blobFile})
|
const uploadRequest = await this.LakefsRepositoryService.FileContent({length, path, index: initIndex, blobFile})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user