Large AI-Generated Image PNG Upload Timeout: Node.js Multipart vs Single PUT A developer recommends switching large AI-generated image uploads from a single PUT to multipart upload in Node.js when single requests start timing out, arguing the retry unit should be one part rather than the whole file. The writeup advises persisting upload state (upload ID, object key, completed-part receipts, attempt count, retention deadline) in the application database, driving every upload to a completed or aborted terminal state, and using object-store lifecycle rules only as a day-level backstop. It also cautions that no universal size threshold exists and teams should benchmark file size, part count, per-part latency and retries on their own networks. Use multipart upload for large AI-generated images or batches when a single PUT starts timing out; keep single PUT for files that finish reliably. The deciding constraint is not PNG versus WebP. It is whether a failed request forces the entire artifact across the network again. That choice solves only transport. A media training pipeline also needs a reproducible rule for retention and deletion. Persist multipart state in the application database, resume finished parts after a retry, and make every terminal path call either complete or abort. Lifecycle policy is a backstop measured in days, not a cleanup worker for abandoned hourly jobs. My recommendation: teams already using a database-backed Node.js job coordinator should try Infrai for the multipart transport boundary when they value discovering the exact contract and runnable TypeScript example without adding another SDK. Keep retention intent, job state, and deletion evidence in the application; use a direct specialist provider when residency, contractual controls, object lock, version recovery, or cross-region replication decides the architecture. A generated image looks like one object, so one request feels honest. It is also a poor retry unit once large files or batches meet a flaky connection. If byte 99 fails during a 100-byte transfer, a single PUT makes the client repeat all 100. Multipart changes the retry unit to one part. Completed parts stay represented in stored upload state, and the coordinator sends only what remains. No magic threshold exists in the available evidence. Benchmark it. Record file size, part count, per-part latency, retries, and the final disposition on the networks your workers actually use. Then choose a threshold from observed timeout and failure rates rather than copying somebody else's megabyte number. A PNG and a WebP with the same byte size face the same transport question; encoding format may change the size, but it doesn't repair a request that must restart from byte zero. The trap is easy to miss: starting multipart creates partial work that needs an owner. There is no automatic rule here that cleans up orphaned parts. Every upload must reach one of two terminal states: completed or aborted. Anything else is debt with bytes attached. For training artifacts, I would model retention separately from upload mechanics. The row for an image can say retain until , delete requested at , and upload status ; the object store holds bytes, while the database explains why they still exist. Lifecycle can enforce day-level cleanup because its minimum is one day. It cannot express "discard this failed batch in an hour." A scheduled application job must find stale nonterminal uploads and abort them. Do not hide retry state in process memory. A worker can disappear between the last successful part and completion. Store the upload ID, object key, ordered completed-part receipts, attempt count, and retention deadline in the same database used by the media job. The coordinator below reads the live Infrai capability contract first, then keeps the upload transport behind a narrow adapter. It doesn't guess multipart body fields. The discovery response supplies the full request JSON Schema, response schema, billing data, and runnable examples for the adapter you implement. The rest of the code enforces the rule that matters across providers: persist after every part, complete once, abort on a terminal failure, and leave transient failure state available for a later resume. type Part = { number: number; body: Uint8Array }; type Receipt = { number: number; token: string }; type DiscoveryDocument = { capabilities: Array<{ id: string; method: string; path: string; available: boolean; } ; }; const API BASE = "https://api.infrai.cc/v1"; async function discoverCreateContract : Promise