mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #323] need to edit "name" value to upload image #200
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#200
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 @maundytime on GitHub (Dec 16, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/323
Description:
I need to edit "name" value to upload image. The website fanfou.com use "image" and "photo". In OAuthSwift, the name value is "media". I didn't find a way to change it without edit OAuthSwift project in pod... I also can't make extension to OAuthSwift outside of the pod since "multiDataFromObject(...)" func is internal. Would like to hear some suggestions... Thanks.
Where "name" is...

The extension inside pod I write now... The extension would disappear when I update pod.

Fanfou.com do not accept "parameters" when they are already in "body", so I use func "request(...)" without the "parameters".
OAuth Provider (Twitter, Github, ..):
fanfou.com
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
8.0 (Swift 3.0)
8.0 (Swift 2.3)
7.3.1
other: (Please fill in the version you are using.)
objective c
@phimage commented on GitHub (Dec 16, 2016):
for your workflow until a solution is found, you can checkout OAuthSwift somewhere, edit it
and then in your project Podfile use
pod 'OAuthSwift', :path => 'path/where/you/checkout/OAuthSwift/OAuthSwift.podspec'
makeMultiPartRequest(_ urlString: String, method: OAuthSwiftHTTPRequest.Method, parameters: OAuthSwift.Parameters = [:], multiparts: Array<OAuthSwiftMultipartData> = [], headers: OAuthSwift.Headers? = nil)is open and accessible from outside, you can use itmultiPartRequestcall bypostImageis an example of multipart post request@maundytime commented on GitHub (Dec 17, 2016):
Got it. I would try this. Thank for help~