Skip to content

fix(upload): decode request file field as base64 and add explicit path upload helpers - #101

Draft
tbarbugli wants to merge 1 commit into
masterfrom
tommaso/sec-2511-upload-helpers
Draft

tbarbugli wants to merge 1 commit into
masterfrom
tommaso/sec-2511-upload-helpers

Conversation

@tbarbugli

@tbarbugli tbarbugli commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Linear: SEC-2511

Summary

  • Treat FileUploadRequest::$file and ImageUploadRequest::$file strictly as base64-encoded content in Client::uploadFile() / Client::uploadImage() instead of probing file_exists() on the file field first.
  • Add explicit Client::uploadFileFromPath() and Client::uploadImageFromPath() helpers for callers that intentionally upload a local file by path.
  • Add unit tests in tests/ClientTest.php.

Testing

  • make lint && make test-unit (PHPStan 0 errors, 340 PHPUnit tests passing)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant