Skip to content
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

头像、用户名接口 #2

Open
lzwjava opened this issue Dec 1, 2015 · 0 comments
Open

头像、用户名接口 #2

lzwjava opened this issue Dec 1, 2015 · 0 comments

Comments

@lzwjava
Copy link
Owner

lzwjava commented Dec 1, 2015

请求七牛 token

http://codereview.pickme.cn/qiniu/token

image

拿到 token 后用七牛 SDK 上传文件即可。这里有个 bucketUrl ,七牛上传后会返回 key。bucketUrl/key 来拼接成最后的url。

这个。post mutile-part 即可。

更新头像或用户名

http://codereview.pickme.cn/user/update

image

要更新哪个用户是用 cookie 里的 crtoken 或者 X-CR-Session 头确定的。
web 端不用管。iOS 这边需要设定 X-CR-Session Header,值为 已登录的用户的 sessionToken 。

更新完后,我这边会返回更新后的对象。

@NextCodeReview/staff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant