"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.scheduleDeleteResumableUploadMetaFile = exports.getResumableUploadPath = void 0;
const path_1 = require("path");
const job_queue_1 = require("../lib/job-queue");
const constants_1 = require("../initializers/constants");
function getResumableUploadPath(filename) {
    if (filename)
        return (0, path_1.join)(constants_1.RESUMABLE_UPLOAD_DIRECTORY, filename);
    return constants_1.RESUMABLE_UPLOAD_DIRECTORY;
}
exports.getResumableUploadPath = getResumableUploadPath;
function scheduleDeleteResumableUploadMetaFile(filepath) {
    const payload = { filepath };
    job_queue_1.JobQueue.Instance.createJob({ type: 'delete-resumable-upload-meta-file', payload }, { delay: 900 * 1000 });
}
exports.scheduleDeleteResumableUploadMetaFile = scheduleDeleteResumableUploadMetaFile;
//# sourceMappingURL=upload.js.map