Skip to content

Conversation

@islandbitcoin
Copy link
Contributor

PR 3: feat/upgrade-request-file-upload

Title: feat: add base64 file upload support to business upgrade request

Summary:

  • Accept base64-encoded files in idDocument field (data:mime;base64,...)
  • Decode and upload to ERPNext automatically
  • File upload failures logged but don't fail the request
  • 4 new unit tests (22 total for the file)

Usage:
idDocument: "data:application/pdf;base64,JVBERi0xLjQK..."

Add support for uploading ID documents as base64-encoded data in the
idDocument field. Files are decoded and uploaded to ERPNext.

Changes:
- Accept base64 data URL format (data:mime;base64,...) in idDocument
- Add parseBase64DataUrl() helper to decode and extract file data
- Add uploadFile() method to ErpNext service
- Add FileUploadError to error handling
- File upload failures are logged but don't fail the request
- Add unit tests for base64 file upload

Usage: Pass base64 data URL in idDocument field:
  idDocument: "data:application/pdf;base64,JVBERi0xLjQK..."

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@islandbitcoin islandbitcoin requested a review from brh28 January 13, 2026 01:42
@islandbitcoin islandbitcoin self-assigned this Jan 13, 2026
@islandbitcoin islandbitcoin added the enhancement New feature or request label Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants