Note that there are some explanatory texts on larger screens.

plurals
  1. POWordpress Can not upload an image through wp.uploadFile using c#
    text
    copied!<p>I'm working on a .net program to communicate with wordperss through xml-rpc.net. I found that if I'm trying to upload an image which is kind of large through "wp.uploadFile", wordpress will return an error saying " parse error(-32700), well not formed". I tried Windows Live Write to write a post. However, if I choose to link the source picture, I got an error saying I can't upload an image, and uploading images through ftp was suggested.</p> <p>I found this article: Image Uploading Fails</p> <p>I think there may still be some issue in reading large request does not contain break lines, so I build the xml myself, and add a break line ('\r\n') every 76 characters according to RFC 822. But the issue is still there, in another word, I can not upload any kinda large images. my xml file is as follow:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt; &lt;methodCall&gt; &lt;methodName&gt;wp.uploadFile&lt;/methodName&gt; &lt;params&gt; &lt;param&gt; &lt;value&gt; &lt;i4&gt;0&lt;/i4&gt; &lt;/value&gt; &lt;/param&gt; &lt;param&gt; &lt;value&gt; &lt;string&gt;myname&lt;/string&gt; &lt;/value&gt; &lt;/param&gt; &lt;param&gt; &lt;value&gt; &lt;string&gt;mypwd&lt;/string&gt; &lt;/value&gt; &lt;/param&gt; &lt;param&gt; &lt;value&gt; &lt;struct&gt; &lt;member&gt; &lt;name&gt;name&lt;/name&gt; &lt;value&gt; &lt;string&gt;MS-wedge.jpg&lt;/string&gt; &lt;/value&gt; &lt;/member&gt; &lt;member&gt; &lt;name&gt;type&lt;/name&gt; &lt;value&gt; &lt;string&gt;image/jpeg&lt;/string&gt; &lt;/value&gt; &lt;/member&gt; &lt;member&gt; &lt;name&gt;bits&lt;/name&gt; &lt;value&gt; &lt;base64&gt; /9j/4AAQSkZJRgABAQEBLAEsAAD7gAOQWRvYmUAZAAAAAAB+EVpkV4aWYAAE1NACoAAAAIABAB AAADAAAAARIAAAABAQADAAAAAQwAAAABAgADAAAAAwAAAM4BBgADAAAAAQACAAABDwACAAAAEgAA &lt;!-- ... pending other data --&gt; &lt;/base64&gt; &lt;/value&gt; &lt;/member&gt; &lt;member&gt; &lt;name&gt;overwrite&lt;/name&gt; &lt;value&gt; &lt;boolean&gt;false&lt;/boolean&gt; &lt;/value&gt; &lt;/member&gt; &lt;/struct&gt; &lt;/value&gt; &lt;/param&gt; &lt;/params&gt; &lt;/methodCall&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload