Using external upload form gives error “File of type is not allowed.”
-
Hi All
I have written myself a Perl CGI that grabs images from my camera, thumbnails them and then produces a “contact sheet”. I am trying to include a form that will allow me to upload directly to WordPress (1.5.1.2), but just get an error “File of type is not allowed” from WordPress every time.
This is what the form looks like – I derived it from the “normal” upload form, just cut it down a bit; I don’t use a file selector (just a hidden field) as I already know the file name…
<form action="http://www.mss.cx/blog/wp-admin/upload.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="img1" value="/var/apache/tmp/pix-ea6c4256da4e51621cbb7a326251d737/cbce19fd222da7d09bc895ee491f57bc_t.jpg" />
<label for="desc_cbce19fd222da7d09bc895ee491f57bc.jpg">Upload Label</label><input type="text" name="imgdesc" id="desc_cbce19fd222da7d09bc895ee491f57bc.jpg" size="30" />
<input type="hidden" name="thumbsize" value="none" />
<input type="submit" name="submit" value="Upload Thumb to WordPress" />
</form>Any ideas? I thought I had it for a minute, but I was wrong…
- The topic ‘Using external upload form gives error “File of type is not allowed.”’ is closed to new replies.