abrudtkuhl / WordPressSharp

A C# client to to interact with the WordPress XML-RPC API
abrudtkuhl.github.io/WordPressSharp/
GNU General Public License v3.0
103 stars 49 forks source link

UploadFile "Not Found" error #60

Closed JM63 closed 7 years ago

JM63 commented 8 years ago

I'm trying to upload same pictures to wordpres media library with this code , but i always get the error "Not Found". I have try replace WordPressSiteConfig Baseurl with the IP, but then i get error "Forbidden". I have checked the media library folder permissions (0755 to 0777) but the problem remains. What am I doing wrong?

WordPressSiteConfig _wpConfig = new WordPressSiteConfig(); _wpConfig.BaseUrl = "http://mydomain.com"; _wpConfig.BlogId = 0; _wpConfig.Username = username; _wpConfig.Password = password;

using (var client = new WordPressSharp.WordPressClient(_wpConfig)) { var featureImage = WordPressSharp.Models.Data.CreateFromUrl(imageurl); featureImage.Name = Path.GetFileNameWithoutExtension(imageurl); WordPressSharp.Models.UploadResult ur = client.UploadFile(featureImage); }

Thanks Marcos

XHyperY commented 7 years ago

Did you resolved the issue?

abrudtkuhl commented 7 years ago

@XHyperY believe this is fixed with #64