multipart-kit
multipart-kit copied to clipboard
🏞 Parses and serializes multipart-encoded data with Codable support.
**Is your feature request related to a problem? Please describe.** I need to parse multipart/form-data that is sent from an iOS app using Alamofire without knowing what the boundary is...
As [suggested](https://forums.swift.org/t/sswg-0017-multipartkit/52586/8) by @stephencelis, MultipartKit would benefit from the ability to customise the parsing strategy.
Hi, I've been trying using this library (version 4.0.0-beta.2) together with AsyncHTTPClient to execute a multipart POST request, where I need to upload a file. The expected request should look...
### Describe the bug Server crashes on a multipart/form-data request with an empty mimeType. ### To Reproduce Steps to reproduce the behavior: 1. Send a multipart/form-data request from a client...
Added `encodeToData` function to `FormDataEncoder` which returns Data instead of String. Added `serializeToData` function to `MultipartSerializer` which returns Data instead of String. Added `decode` function to `FormDataDecoder` which accepts Data...
### Describe the bug When using `FormDataEncoder` to encode data objects, specifically JPEG image data, the data gets corrupted. ### To Reproduce This can easily be reproduced by feeding JPEG...
I was trying to encode struct like that: ```swift struct MyStruct { let imageFile: Data } let encoder = FormDataEncoder() let body = try encoder.encode(options, boundary: boundary) ``` But `imageFile`...
This adds a `MultipartWriter` which replaces `MultipartSerializer`. The new structure follows the pattern adopted by Hummingbird's (and therefore Vapor 5's) `ResponseBody` structure. This allows users to be able to define...
Closes #132 This adds a new `ContentDisposition` type to be able to type-safely parse Content-Disposition header fields. Also adds some docs