<form method="POST" action="/cgi-bin/login/page.pl" enctype="multipart/form-data">
<input type="hidden" name="block" value="save">
<input type="hidden" name="file" value="">
<input type="hidden" name="code" value="8338958023">
<div class="margins">
<b><input type="text" name="title" value="" size="62" maxlength="100" ID="textheader"></b><br>
<textarea rows="25" name="text" cols="60" wrap="virtual" ID="textform"></textarea></font>
<script>document.forms[0].title.focus()</script>
</div>
<div ID="textlink">
Add image:
<input type="file" name="photo" size="32" ID="butt">
(<a href="/about/pics.html" target="_blank">about illustrations</a>)
</div>
<div class="margins">
<input type="submit" value="Send post">
</div>
</form>
formData.append( "block", "save" );const XHR = new XMLHttpRequest();XHR.open( 'POST', "http://www.***.ru/cgi-bin/login/page.pl", false );var formData = new FormData();formData.append( "block", "save" );formData.append( "file", "" );formData.append( "code", "8338958023" );formData.append( "title", "Title" );formData.append( "text", "Text." );formData.append( "photo", new Blob([app.ReadFile( "image.jpg" )], { "type": "image/jpeg" }) );XHR.send( formData );var data = XHR.responseText;Dave added a 'binary' option to ReadFile but it is in beta, or maybe still alpha, I do not remember. I would suggest contacting him to be a beta member.
Chris
sorry i'm not realy good in english today xD
There are a few ways to handle this, but i'm not reinventing the wheel. The beta has a binary option for ReadFile and makes this sort of thing easy.
Chris