mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #541] Is there any way to get progress data during a multipart post? #355
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#355
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MickeDG on GitHub (Aug 17, 2019).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/541
Description:
I'm successfully doing a multipart post of a video and would like to show a progress bar to the user...
OAuth Provider? (Twitter, Github, ..):
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
11.x (Swift 5.1)
10.x (Swift 5.0)
10.x (Swift 4.1)
9.3 (Swift 4.1)
9.0 (Swift 4.0)
other: (Please fill in the version you are using.)
objective c
@phimage commented on GitHub (Aug 20, 2019):
here
github.com/OAuthSwift/OAuthSwift@a471698f0b/Sources/OAuthSwiftClient.swift (L22)there is an
URLSessionFactoryinside you could put a delegate to associate with the URLSession
for instance one with
https://developer.apple.com/documentation/foundation/urlsessiontaskdelegate/1408299-urlsession
@MickeDG commented on GitHub (Aug 20, 2019):
Thanks - I understand the main idea but not exactly how to implement it. Do I insert a function like this one:
urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)
in the the URLSessionFactory struct?
How do I then call it my code?
@phimage commented on GitHub (Aug 20, 2019):
You make your own class or struct, which implement the delegate
then do
client.sessionFactory.delegate = <yourclassorstruct>and I think you will receive some events in your method. I have not tested it but if I put correctly the delegate in apple sessions and I do not put my own delegate ...
@MickeDG commented on GitHub (Aug 21, 2019):
Thank you - I got it working! It was enough with the existing UrlSession delegate in URLSessionFactory
In my class: