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

Willing to add a File publisher #10

Open
igrishaev opened this issue Dec 24, 2024 · 0 comments
Open

Willing to add a File publisher #10

igrishaev opened this issue Dec 24, 2024 · 0 comments

Comments

@igrishaev
Copy link

igrishaev commented Dec 24, 2024

First of all, thanks for the library! I've been happily using it after switching from clj-http. It's a part of our S3 internal client.

One thing I've noticed is, it looks like the convert-body-publisher function doesn't take into account a case when the body is a File object. The HttpRequest.BodyPublishers class has a static method to handle files: . ofFile(Path path). This is a good case for s3 because most often, we upload File objects there.

My question is, will you accept my PR if I extend the convert-body-publisher function with something like:

...
(instance? java.io.File body)
(HttpRequest$BodyPublishers/ofFile (.getPath body))

UPD: #11

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

No branches or pull requests

1 participant