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
@@ -182,28 +182,19 @@ export class MiddlewareServiceService {
CMAPIFileContent({length, path, index, blobFile}) {
const headers = new HttpHeaders();
headers.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
CMAPIFileContent({length, path, index, base64}) {
// const geturl = 'http://localhost:3001/FileHub';
const geturl = environment.apiPCURL + 'FileContent/UploadFile';
let options = {
headers: headers
};
const formData = new FormData();
formData.append("blobFile", blobFile);
formData.append("length", length);
formData.append("index", index.toString());
if(path) {
formData.append("path", path);
const data = {
index,
length,
base64,
path,
}
return this.http.post<IuploadFileLK>(`${geturl}`, formData, options)
return this.http.post<IuploadFileLK>(`${geturl}`, data)
}
CMAPIRequestUpload() {