|
|
Thread Tools | Display Modes |
|
#1
|
|
|
Beginner grinner
|
Uploading a Photo
Hi! I get problems uploading a photo to my album.
I login fine and get session ID as follows: p.Add("method","smugmug.login.withPassword"); p.Add("EmailAddress", "xxx@xxx.com"); p.Add("Password","xxx"); p.Add("APIKey",API_KEY); byte[] response1 = webClient.UploadValues("https://api.smugmug.com/services/api/xmlrpc/1.2.2/", p); If I get Album Info the results are fine. However when I try to upload a photo something goes wrong. I try both ways, but loading from local drive is preferable: p.Add("method", "smugmug.images.uploadFromURL"); p.Add("SessionID", Session); p.Add("AlbumID", "xxx"); p.Add("URL", "http://xxx.com/xxx.jpg"); byte[] response2 = webClient.UploadValues("https://api.smugmug.com/services/api/xmlrpc/1.2.2/", p); The server throws Internal Error 500, the image is actually added to the gallery. webClient.Headers.Add("X-Smug-AlbumID", "xxx"); webClient.Headers.Add("X-Smug-SessionID", Session); webClient.Headers.Add("X-Smug-Version", "1.3.0"); webClient.Headers.Add("X-Smug-FileName", FileName); webClient.UploadFileAsync(new System.Uri("http://upload.smugmug.com/" + FileName), FileName); No errors happen, however the image is not added to the Gallery and the responsse comes empty. What am I doing wrong? |
|
|
|
| Tell The World! | |
| Similar Threads | Thread Starter | Forum | Replies | Last Post | ![]() |
| Star*Explorer Thread | Nikolai | SmugMug APIs, Hacks & Tricks | 1352 | Mar-08-2013 06:39 PM | |
| >>> Nightpixels, People Photo Challenge #1 winner | ivar | People | 12 | Dec-13-2009 10:26 AM | |
| >>> People Photo Challenges --- Rules & Information & Links | ivar | People | 0 | Nov-01-2009 12:55 AM | |
| **WCC (Weddings Challenge Contest) #1: REFLECTION | heatherfeather | Weddings | 62 | Sep-24-2009 02:59 PM | |
| Advice sought on photo prep for uploading | oomhoward | SmugMug Support | 7 | Jul-21-2005 03:05 PM | |
| Thread Tools | |
| Display Modes | |
|
|