coderank-server-data/scripts/upload.ts
2026-01-28 13:16:34 +01:00

19 lines
399 B
TypeScript

import s3UploadFile from "../utils/s3-upload";
const cliArgs = [...process.argv];
const bucketDstName = cliArgs.pop();
const filePath = cliArgs.pop();
if (!filePath || !bucketDstName) {
console.error("Usage: bun upload.ts <file-path> <bucket/destination>");
process.exit(1);
}
await s3UploadFile({
fileName: bucketDstName,
filePath,
});
console.log(`✅ Uploaded ${filePath}`);