Support » Requests and Feedback » image upload plugin enctype problem (request)

  • hi.
    i wrote a plugin for a template which uses special meta keys
    (Thumbnail and Landscape).
    my plugin adds a <input type=”file” … > to dbx_page_advanced and
    dbx_post_advanced for simplify uploading images. also, plugin resizes
    the image, create thumbnail and adds watermarks to images. and insert
    them into the wp_postmeta table.
    the only problem is in wp-admin/edit-form-advanced.php i wanted to use
    $_FILES but there is no enctype=”multipart/form-data” in <form>
    i change 20+ sites uses this plugin when every wordpress update.. 🙁
    is it possible you add enctype to original wordpress?
    will it create a bug?

    function ry_resim_ekleme_formu() {
    echo ‘
    <div class=”postbox”>
    <h3>Upload Image</h3>
    <div class=”inside”>
    <label for=”img1″>Image:</label>
    <input type=”file” name=”img1″ id=”img1″ />

    function ry_resim_kaydet() {
    i can’t reach $_FILES in here.
    because there is no enctype definition in wp-admin/edit-form-advanced.php

    add_action(‘dbx_page_advanced’, ‘ry_resim_ekleme_formu’);
    add_action(‘dbx_post_advanced’, ‘ry_resim_ekleme_formu’);

    add_action(‘edit_post’, ‘ry_resim_kaydet’);
    add_action(‘publish_post’, ‘ry_resim_kaydet’);
    add_action(‘save_post’, ‘ry_resim_kaydet’);
    add_action(‘edit_page_form’, ‘ry_resim_kaydet’);

  • The topic ‘image upload plugin enctype problem (request)’ is closed to new replies.