Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6564739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:00:19+00:00 2026-05-25T14:00:19+00:00

Can I rename an image that is uploaded using CKFinder?

  • 0

Can I rename an image that is uploaded using CKFinder?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:00:19+00:00Added an answer on May 25, 2026 at 2:00 pm

    Do you use the PHP version of CKFinder? If so, the following might help.

    When uploading files, you can automatically remove spaces, characters with accents, and such. Set “ForceAscii” to “true” in the config.php file:

    $config['ForceAscii'] = true;
    

    The code for the “ForceAscii” setting is found starting on line 59 in this file:
    ckfinder\core\connector\php\php5\CommandHandler\FileUpload.php

        if ($_config->forceAscii()) {
          $sFileName = CKFinder_Connector_Utils_FileSystem::convertToAscii($sFileName);
        }
    

    To rename the file as it’s uploaded, you could add your own code to the “ForceAscii” code.

    To add some Static text to the beginning or the end:

        if ($_config->forceAscii()) {
            $sFileName = CKFinder_Connector_Utils_FileSystem::convertToAscii($sFileName);
            $sFileName .= "YourTextHere"; // Append your text
            $sFileName = "YourTextHere" . $sFileName; // Prepend your text
        }
    

    Just before the force ascii code is a string replace, you could add your own version of a string replace if that would meet your goals.

    $sFileName = str_replace(array(":", "*", "?", "|", "/"), "_", $sUnsafeFileName);
    

    If the text used for the rename will vary, you’ll need to provide a lot more details:
    Will the text vary depending on which user is uploading the file?
    Will it vary for each image, regardless of who uploads it?
    What will determine the actual text that is used (based on username?).

    The latest version, 2.1 allows the user to upload multiple files at one time. This could affect the approach you take.

    If you provide additional information, I’ll see if I can come up with a better answer.


    Is this meant to allow the end user to rename their images?
    It is possible for the user to rename an image as follows:

    When they are looking at the images in the file browser window, they would right click on an image.
    “Rename” is one of the options in the context menu.

    EDIT: The latest version of CKFinder (2.1) has a config setting that is placed in the config.js file:

    config.showContextMenuArrow = true;
    

    this setting allows the user to access the context menu by clicking on an arrow that appears in the corner of the image.

    Be Well,
    Joe

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given a zipfile with an unknown directory, how can I rename or move that
how can I by using Ado.net rename existing column in a table and changing
In the attached screen shot you can she that to rename a selected tab
I have a large number of image files that i need to rename from
How can I rename a virtual directory (i.e., change the Virtual Path name) in
How can I rename all hidden directories under the current directory in DOS? I've
I can run RENAME TABLE student TO student_new ; The command is same and
Can I safely rename the cygdrive folder? Also, I would like to add other
Is there an automatic way I can use to rename a pylons controller? If
How can I use SMO to rename the physical .mdf .ndf .ldf files. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.