Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
alkihis committed Feb 5, 2021
1 parent 9ea5c87 commit 91c98b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/api/cloud/upload.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Response, Router } from 'express';
import { methodNotAllowed } from "../../helpers";
import uploader, { ChunkManager, ChunkManifest, MAX_ALLOWED_CHUNKS, MAX_CLOUDED_ARCHIVES, UploadManager } from '../../uploader';
import uploader, { ChunkManager, ChunkManifest, MAX_ALLOWED_CHUNKS, MAX_CLOUDED_ARCHIVES, UploadManager, UPLOAD_PATH } from '../../uploader';
import AEError, { sendError } from '../../errors';
import logger from '../../logger';
import { CloudedArchiveModel } from '../../models';
import md5File from 'md5-file';
import { CONFIG_FILE } from '../../constants';
import path from 'path';

const UploadArchiveCloud = Router();

Expand Down Expand Up @@ -160,7 +161,7 @@ UploadArchiveCloud.post('/terminate.json', (req, res) => {

// Reconstruct original file
const final_path = await manager.reconstructFile(manifest);
const hash = await md5File(final_path);
const hash = await md5File(path.normalize(UPLOAD_PATH + '/' + final_path));

// Register file into mongodb
await CloudedArchiveModel.create({
Expand Down

0 comments on commit 91c98b5

Please sign in to comment.