【发布时间】:2014-02-22 09:18:32
【问题描述】:
我正在使用 buddy sdk
这个示例告诉我如何添加个人资料图片,我尝试了各种方式,但是当我尝试使用此代码时
client.CreateUserAsync("username","password").ContinueWith(r => { var user = r.Result;
// upload a profile photo
Stream photoStream = GetSomePhoto();
user.AddProfilePhotoAsync(photoStream);
});
这是我的代码,但它给了我数组问题
var img = loginImagePicker.Image.AsPNG().AsStream();
var hu = await user.AddProfilePhotoAsync(img);
这就是问题
有什么建议吗?
【问题讨论】:
-
你能添加你得到的错误的描述吗?例如编译,运行时异常?
-
确定我刚刚上传了图片,
-
事实上,我只是尝试上传流文件但返回“字符大小太大”奇怪buddy.com/dotnetsdk/html/…这是sdk的链接
-
事实上,我只是使用了你的流转换器(看到你的帖子),比如 aspng().asstream,它可以但是扔掉那个东西
标签: c# ios xamarin.ios stream uiimage