Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check logo migration from legacy SDK (version 6.2.0) to version 13.4.3 #333

Open
better-charles opened this issue Aug 24, 2023 · 0 comments

Comments

@better-charles
Copy link

The legacy SDK supported sending the check logo on check creation in a multipart request by passing a java.io.File to the logo method on the CheckRequest.Builder.

Here are the logo method signatures

        public Builder logo(final String logo) {
            this.logo = LobParam.strings(LOGO, logo);
            return this;
        }

        public Builder logo(final File logo) {
            this.logo = LobParam.file(LOGO, logo);
            return this;
        }

        public Builder logo(final LobParam logo) {
            this.logo = logo;
            return this;
        }

and the logo field on the Request Post Body in my Lob Dashboard logs for a successfully created check:

  "logo": {
    "path": "/tmp/lob-assets/1692735566246-1-ee7d69c4db092941",
    "bytes": 6887,
    "filename": "logo-square10161330255379002724.png",
    "headers": {
      "content-disposition": "form-data; name=\"logo\"; filename=\"logo-square10161330255379002724.png\"",
      "content-type": "application/octet-stream",
      "content-transfer-encoding": "binary"
    }
  }

By contrast, in version 13.4.3, CheckEditable.setLogo only takes a String. While the API doc mentions that logo "accepts a remote URL or local file upload", the SDK does not seem to support the latter -- I've tried specifying the file path as well as a data URI containing the base64-encoded image, and both result in a check that fails to render in the dashboard.

Is there still a way to send the logo image itself in the request in version 13.* of the SDK or is a remote URI the only option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant