mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
change message
This commit is contained in:
@@ -381,7 +381,7 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
|
||||
} 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 {
|
||||
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;
|
||||
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 chunk = await ChucksManager.chunks.getChunks(index)
|
||||
const blob = new Blob([chunk]);
|
||||
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})
|
||||
}
|
||||
|
||||
@@ -992,7 +978,6 @@ class UploadFileUseCase {
|
||||
const chuck = await ChucksManager.chunks.getChunks(initIndex)
|
||||
const blob = new Blob([chuck]);
|
||||
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})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user