WordPress.org

Ready to get started?Download WordPress

Forums

UploadPlus : File Name Cleaner
File name get Double when using Custom Prefix (7 posts)

  1. Technologyka
    Member
    Posted 1 year ago #

    Hi there, this is such a good plugin, but i find a little problem here.

    When I set in "custom prefix" text field. the image name result always get doubled.

    For example I have Picture with name Technologyka.jpg and I set "Image-" to the "custom prefix" text field.

    When I upload the image, the filename results is Image-Image-Technologyka.jpg.

    I just want the "Image-" appear just one time.

    Can you please fix this issue?

    Thanks Before :D

    http://wordpress.org/extend/plugins/uploadplus/

  2. swergroup
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, it's a known last-minute bug. Can you please tell us what version you were using? It should be fixed with the latest one. If not, please tell us and we'll fix it ASAP.

  3. Technologyka
    Member
    Posted 1 year ago #

    Thanks for your respons

    Currently I Using WordPress 3.3.2 and UploadPlus latest version.

  4. aXis_Symmetry
    Member
    Posted 1 year ago #

    Hi there, I'm also currently facing the same problem like Technologyka. I'm using WordPress Version 3.5.1 and UploadPlus is currently on its latest version.

    Since I'm having the same problem, so I thought better to reply here instead having another different post.

    Hoping that this plugin will not lose support from the dev. A cool and must have plugin for WordPress IMO. Thanks in advance

  5. swergroup
    Member
    Plugin Author

    Posted 11 months ago #

    We're trying our best to support our plugins and those acquired from pixline, but it takes a lot of time and we don't really have the resources to do as we would.

    Apart from that: this - and other - fix and enhancements should be released in time for WP 3.6

  6. Jonas Lundman
    Member
    Posted 10 months ago #

    The self::upp_mangle_filename() are called twice for the same upload, and add the prefix on the prefix the second time.

    This is a quick fix until author release the ever waiting for wp 3.6 version... replace this part in core.class.php, around line 130

    /*    sanitize uploaded file name    */
            function upp_mangle_filename($file_name){
                if(isset($GLOBALS['UPLOAD-PLUS-NAMES'][$file_name])) return $file_name;
                global $sep;
            	$ext = self::find_extension($file_name);
    
                $utf8 = get_option('uploadplus_utf8toascii');
            	if( $utf8[0] == "1" ):
                    $file_name = self::_utf8_transliteration( $file_name );
            	endif;
    
                $file_name = self::_clean_global( $file_name );
                $file_name = self::_clean_filename( $ext, $file_name );
                $file_name = self::_clean_case( $file_name );
                $file_name = self::_add_prefix( $file_name );
                $GLOBALS['UPLOAD-PLUS-NAMES'][$file_name] = 1;
            	return $file_name;
            }

    Hope it helps

  7. Paolo T. (pixline)
    Member
    Plugin Author

    Posted 10 months ago #

    It helps a lot, really. Thank you Jonas!

    Again, feel free to join us on github repo!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.