-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add multipart/form-data
support
#44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🪙
NetworkingSampleApp/NetworkingSampleApp/Scenes/Upload/FormUploadsViewModel.swift
Outdated
Show resolved
Hide resolved
NetworkingSampleApp/NetworkingSampleApp/Scenes/Upload/UploadsView.swift
Outdated
Show resolved
Hide resolved
NetworkingSampleApp/NetworkingSampleApp/Scenes/Upload/UploadsView.swift
Outdated
Show resolved
Hide resolved
Sources/Networking/Core/Upload/MultipartFormData+BodyPart.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments in first round
NetworkingSampleApp/NetworkingSampleApp/Scenes/Upload/FormUploadsViewModel.swift
Outdated
Show resolved
Hide resolved
NetworkingSampleApp/NetworkingSampleApp/Scenes/Upload/FormUploadsViewModel.swift
Outdated
Show resolved
Hide resolved
NetworkingSampleApp/NetworkingSampleApp/Scenes/Upload/FormUploadsViewModel.swift
Outdated
Show resolved
Hide resolved
NetworkingSampleApp/NetworkingSampleApp/Scenes/Upload/UploadService.swift
Outdated
Show resolved
Hide resolved
Sources/Networking/Core/Upload/MultipartFormData+BodyPart.swift
Outdated
Show resolved
Hide resolved
Sources/Networking/Core/Upload/MultipartFormData+BodyPart.swift
Outdated
Show resolved
Hide resolved
NetworkingSampleApp/NetworkingSampleApp/Extensions/ByteCountFormatter+Convenience.swift
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing left on my side... @tonyskansf
otherwise we're done here 👍
NetworkingSampleApp/NetworkingSampleApp/API/Routers/SampleUploadRouter.swift
Show resolved
Hide resolved
…und upload, error handling
[FIX] Upload manager adjustments
This pull request adds
multipart/form-data
content type upload support on top of the existing functionality in #43. Also, the changes contain an example showcasing the usage of the API.Implementation
MultipartFormDataEncoder
Provides two ways of encoding the MultipartFormData: either in-memory encoding or encoding to disk. In-memory encoding is suitable for small payloads while encoding to disk is preferred and more efficient for large payloads to prevent memory issues.
Regardless of the encoding type, all data are encoded into this representation:
Usage