• Resolved smiffy

    (@smiffy)


    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…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Check the allowed file types in Options/Miscellaneous.

    Thread Starter smiffy

    (@smiffy)

    Yep – that’s fine; .jpg is allowed. If I copy and paste the filename into the file selector in WordPress, it works fine.

    I thought that I’d left off the file extension, but that’s just the width of my post getting truncated 😉

    What is the bare minimum fields that the upload can work with?

    Thread Starter smiffy

    (@smiffy)

    Resolved – this was actually an HTML problem with the upload form.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using external upload form gives error “File of type is not allowed.”’ is closed to new replies.