joomla 1.5 question - how to set CMS to overwrite image files

Posted on 2008-11-06
Last Modified: 2013-11-13
this seems like it should be SO SIMPLE!  that said, i cannot find any documentation about setting the Joomla 1.5 CMS to overwrite image files (instead of just creating new file names - which it currently does).

Anyone have any Joomla experience??

Question by:phillystyle123
    LVL 5

    Expert Comment

    I'm not sure I understand what you are asking can you ellaborate a little.


    Author Comment


    when uploading an image file to the server through my Joomla 1.5 CMS, if the image file already exists on the server, instead of Joomla overwriting the image file on the server, it creates a new image file name.

    For example:

    smith.jpg is on the server

    i want to overwrite smith.jpg with a new smith.jpg.

    when i upload my new smiith.jpg to the server via the CMS joomla does this:
    "the file "smith.jpg" already exists on the server.  we've created a new file name: smith(1).jpg"

    but then i'd have to go in and swap out smith.jpg with smith(1).jpg on all of my pages that use smith.jpg.
    LVL 5

    Expert Comment

    This sounds very much like an ownership issue as when you upload a file using Joomla ftp it will have one owner, opposed to the original image that was created during installation will have another!

    Unfortunately there is only one way around this which is to contact your Host support where you have this ownership problem.

    Ask them to set the ownership of all files to the same!


    Accepted Solution

    Did you find a solution?
    I had the same issue... open /administrator/components/com_media/

    Around line 168 find and remove this code:

    if (file_exists($dest_dir.$file['name'])) {
    		mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], "Upload FAILED. File already exists" );

    Open in new window


    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    This article will show, step by step, how to integrate R code into a R Sweave document
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now