
In Cloudinary's Node.js SDK, upload_large with a local file reports its completed upload through a callback. The immediate return is a stream. Putting await before that call does not turn the stream into the final upload-response object. Preserve the source and connect the completion callback to your intake state before recording an asset URL.
Key Takeaways
- A returned stream and a completed upload response are different objects.
- The documented remote-URL path behaves differently from a local-file path.
- Upload completion does not also approve the creative result or finish every derived rendition.
Identify the return path that your code actually uses
The official Node SDK example explains the local-file callback and remote-URL exception. A flow that appeared correct while importing a remote clip can expose this difference when a client supplies a local export instead.
Record the installed SDK version, method name and input kind in a private diagnostic note. Keep the local file unchanged. Do not expose credentials, signed URLs or a client's full filesystem path in a public issue. This guide describes the documented contract; it does not establish how an unknown wrapper in your application behaves.
Look at where the intake becomes complete. If code stores the immediate return and then reads a response field such as secure_url, it may be examining the stream rather than the completed response. An absent URL at that point does not, by itself, prove that the media is corrupt.
Resolve your application's completion promise from the callback
Use the callback pattern documented for the SDK, wrapping that callback when your surrounding application needs a promise. The control relationship is:
create application promise
start local upload with completion callback
callback error -> reject application promise
callback final result -> resolve application promise with that result
await the application promise before recording the result
This is a control-flow illustration, not runnable integration code. Consult the current example for exact SDK syntax and select the correct resource type for the source. Do not copy sample asset identifiers into a live project if they could replace someone else's work.
Handle failure separately from success. A rejected operation should not leave the same intake state as a completed response. Keep enough private context to associate the callback with the intended submission, especially when several client videos are in flight.
Distinguish the upload result from later processing
The Node upload documentation also distinguishes intermediate chunk responses from the final response. Do not interpret an intermediate done: false message as the completed asset record. Conversely, a completed original upload does not establish that asynchronous derived versions are ready.
The existing partial recording guide concerns recovering source media in an editor. Here the problem is the integration's return-value contract, before a receiving editor or creative approval process has been verified.
Check the local and remote cases without inventing results
On an authorized test project, compare a small local clip with an approved remote source using the intended input paths. Proposed ledger columns are input kind, callback error or final response, recorded asset identifier and the UI intake state. Observe each case; this article does not claim either test has run.
Verify that a failed callback leaves a visible failure rather than a completed task with an undefined URL. For a successful callback, inspect the intended stored original and its identity before declaring intake complete. Keep creative approval separate, and assess destination video compatibility later against the actual delivery requirements.
Related tasks
- Why Can I Edit a Rooms Recording Before Its High-Quality Upload Finishes?
- How Do I Keep the Approved AI Image or Video from Getting Lost Among Revisions?
- My AI video plays in the browser but fails to upload to YouTube. What should I check?
Sources and scope
- Cloudinary Node SDK: Upload a large video: For a local file, upload_large returns a stream and reports its upload result through a callback. A remote URL follows a different return path; the documented callback wrapper handles either input.
- Cloudinary: Node.js image and video upload: Documents chunked upload methods and intermediate done:false responses versus the final done:true upload response.
Documentation-based Node.js integration guidance. No SDK was installed or executed, no client file uploaded, and no timing or reliability improvement measured. The ledger below is a proposed test.
Prepared by Imagild Editorial, the company editorial team responsible for these guides. AI assisted research and drafting. This is documentation-based guidance with proposed examples, not a claim of hands-on testing or an independent product review. Report a correction.
Cover: AI-generated conceptual editorial illustration; not a real application screenshot, observed output or before-and-after test.