feat: Enhance AUTO_UPLOAD configuration parsing

- Improve AUTO_UPLOAD environment variable parsing
- Add support for multiple truthy values ('true', '1', 'yes')
- Convert input to lowercase for case-insensitive comparison
This commit is contained in:
Greirson Lee-Thorp
2025-02-03 22:29:42 -08:00
parent 1a5bc93e01
commit afb4f3f106

View File

@@ -60,7 +60,7 @@
const CHUNK_SIZE = 1024 * 1024; // 1MB chunks
const MAX_RETRIES = 3;
const RETRY_DELAY = 1000;
const AUTO_UPLOAD = '{{AUTO_UPLOAD}}' === 'true';
const AUTO_UPLOAD = ['true', '1', 'yes'].includes('{{AUTO_UPLOAD}}'.toLowerCase());
// Utility function to generate a unique batch ID
function generateBatchId() {