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

Throw exception on passing MultipartFormDataContent in AddPinataFile #1

Open
GorgeousPuree opened this issue Sep 19, 2021 · 0 comments

Comments

@GorgeousPuree
Copy link

Context

Hi, thanks for your Pinata client first of all.
I needed to upload a directory with files. In PinFileToIpfsAsync I've passed Action in which I've called AddPinataFile only once and passed MultipartFormDataContent object in it. Since MultipartFormDataContent is a heir of HttpContent code worked correctly, but when I opened Pinata I saw, that I've uploaded a file without extension.
I was puzzled until I opened your source code and after that I've replaced one call of AddPinataFile passing MultipartFormDataContent with foreach and passing ByteArrayContent.
It is not intended to use MultipartFormDataContent in AddPinataFile, so maybe it should be prevented?

image

Alternatives

Throw ArgumentException when user passes MultipartFormDataContent object in AddPinataFile.

If the feature request is approved, would you be willing to submit a PR?

Yes

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