错误:“必须包含照片数据或源 ID”当我尝试将照片上传到 Gdata .NET 中的 PicasaWeb 时
有人知道我做错了什么吗?
var service = new Service("lh2", "exampleCo-exampleApp-1");
service.setUserCredentials("myuser", "mypass");
var myPhoto = new PhotoEntry
{
Title = new AtomTextConstruct(
AtomTextConstructElementType.Title,
"Puppies FTW")
};
var myMedia = new MediaFileSource(@"C:\puppies.jpg", "image/jpeg");
myPhoto.MediaSource = myMedia;
var u="https://picasaweb.google.com/data/feed/api/user/default/albumid/default";
var returnedPhoto = service.Insert(new Uri(u), myPhoto);
实际上返回错误请求错误 (400),响应字符串如下:必须包含照片数据或源 ID
Somebody know what I'm doing wrong?
var service = new Service("lh2", "exampleCo-exampleApp-1");
service.setUserCredentials("myuser", "mypass");
var myPhoto = new PhotoEntry
{
Title = new AtomTextConstruct(
AtomTextConstructElementType.Title,
"Puppies FTW")
};
var myMedia = new MediaFileSource(@"C:\puppies.jpg", "image/jpeg");
myPhoto.MediaSource = myMedia;
var u="https://picasaweb.google.com/data/feed/api/user/default/albumid/default";
var returnedPhoto = service.Insert(new Uri(u), myPhoto);
Actually is returning bad request error (400) with the following response string: Photo data or source id must be included
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它返回错误,因为 Uri 错误:
我必须使用:
代替:
It was returning error because the Uri was wrong:
I must use:
instead: