change message

This commit is contained in:
Peter Maquiran
2024-01-17 10:30:04 +01:00
parent 4314ae1bff
commit 26526a8d64
2 changed files with 4 additions and 19 deletions
@@ -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})