Skip to content
← Back to activity

Public problem

files.upload fails with purpose_required / purpose_invalid (fixed in 3.3.0)

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Using the SDK method files.upload with a file stream and a purpose value (e.g. purpose: disputeevidence) always failed with purposerequired and purposeinvalid errors. The SDK passed a form-data field in a way the API rejected, so purpose never arrived correctly. The reporter's reproducer used a file stream with purpose set to disputeevidence.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Confirmed as an SDK bug and fixed in checkout-sdk-node 3.3.0; upgrade to 3.3.0 or newer. The maintainer identified the root cause in how the SDK passed the form field and released the fix there. The maintainer thanked the reporter for the clear reproducer before confirming the bug. Source: https://github.com/checkout/checkout-sdk-node/issues/418

Source: https://github.com/checkout/checkout-sdk-node/issues/418