Exemplo n.º 1
0
        public PhotoEntryFull SaveWallPhoto(PhotoUploadedInfo photoInfo, int? userId, int? groupId)
        {
            this.Manager.Method("photos.saveWallPhoto", new object[] { "server", photoInfo.Server,
                                                                        "photo", photoInfo.Photo,
                                                                        "hash", photoInfo.Hash,
                                                                        "uid", userId, "gid", groupId});

            return this.buildPhotoEntryFull(this.Manager.Execute().GetResponseXml());
        }
Exemplo n.º 2
0
        private PhotoUploadedInfo UploadPhoto(int userId, string photoPath)
        {
            HttpUploaderFactory uf = new HttpUploaderFactory();
            NameValueCollection files = new NameValueCollection();

            string uploadUrl = _photosFactory.GetWallUploadServer(userId, null);
            files.Add("photo", photoPath);

            PhotoUploadedInfo ui = new PhotoUploadedInfo(uf.Upload(uploadUrl, null, files));

            return ui;
        }