19 lines
399 B
TypeScript
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}`);
|