Updates
This commit is contained in:
parent
444dcbd3c4
commit
2a2258e890
18
scripts/upload.ts
Normal file
18
scripts/upload.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
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}`);
|
||||||
Loading…
Reference in New Issue
Block a user