Skip to content

Conversation

jar-stripe
Copy link
Contributor

@jar-stripe jar-stripe commented Sep 10, 2025

Why?

Related to #2634. Previously, if a caller specified any stream other than a FileStream, the FileService.Create method would create a file called blob. This PR replaces the Stream type'd argument with a new Options type to let the caller specify an optional name and mime type.

What?

  • adds MultipartFileContent manually maintained class for representing a FileCreateOptions stream data, optional file name, and optional mime type
  • updates form encoding types to process MultipartFileContent
  • updates tests
  • updates generated code

See Also

Changelog

  • ⚠️ Changes FileCreateOptions.File from a Stream to a MultipartFileContent type. This type lets you optionally specify a Name and Type to use when creating the file.

…leCreateOptions stream data, optional file name, and optional mime type

updated form encoding types to process FileFileOptions

updated tests

updated generated code
@jar-stripe jar-stripe requested a review from a team as a code owner September 10, 2025 22:14
@jar-stripe jar-stripe requested review from helenye-stripe and removed request for a team September 10, 2025 22:14
@jar-stripe jar-stripe enabled auto-merge (squash) September 19, 2025 21:19
@jar-stripe jar-stripe merged commit ccf0c39 into master Sep 19, 2025
4 of 5 checks passed
@jar-stripe jar-stripe deleted the jar/enhanced-file-create-params branch September 19, 2025 21:25
helenye-stripe pushed a commit that referenced this pull request Sep 23, 2025
* Add private-preview branch to CI workflow triggers

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* ⚠️ Build SDK w/ V2 OpenAPI spec (#3167)

* generate w/ v2 openapi spec

* move deleted object path

* Adds public BaseUrl to RawRequestOptions (#3170)

renames internal BaseUrl in RequestOptions to InternalBaseUrl 
adds public BaseUrl to RawRequestOptions - it delegates to InternalBaseUrl for safety

* Update generated code (#3172)

* Update generated code for v1955 and 2025-09-30.clover

* Update generated code for v1968 and 2025-09-30.clover

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>

* `just format` formats entire solution (#3174)

* Adds ability to specify file name and type when calling FileService.Create (#3171)

* Update generated code for 9de7288a5c444f47d15545549303c3de4c226c71 and 2025-09-30.clover

---------

Co-authored-by: Michael Broshi <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: David Brownman <[email protected]>
Co-authored-by: jar-stripe <[email protected]>
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
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.

2 participants