bchavez / bchavez/Pinata.Client
Throw exception on passing MultipartFormDataContent in AddPinataFile
- Dominant language
- C#
- Stars
- 17
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
**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?

**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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.