ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Tip regarding file naming conventions for uploaded files

April 24, 2012 3:17am

Subscribe [3]
  • #1 / Apr 24, 2012 3:17am

    CJWEB

    56 posts

    So today I handed the client their shiny, new EE CMS and before I had gotten back to the office they had emailed me a screenshot of an error.

    It was a PHP error along the lines of: http://ellislab.com/forums/viewthread/205515/

    So I sheepishly started looking for the cause by searching this forum, then deactivating modules, then started taking the templates apart.

    Long story short, the very first image the client had uploaded was named:

    *Atom $phere.JPEG

    It was almost as if they were TRYING to break the system!

    So before they could upload ‘delete * from table users.jpg’ I gave them a quick lesson in basic naming conventions for web files.

    My hot tip is to remember this lesson during handover! It could save you a few hours of unnecessary debugging.

  • #2 / Apr 24, 2012 2:51pm

    Rob Allen

    3114 posts

    Ah yes file naming - it hurts sometimes 😊

    I once told a client to name images using a brief description based on a common format, eg 2012_london_bus.jpg, as there were using filename based links and it would be useful for visitors to see what they were downloading.

    Several days later had a phone call saying the site was broken, I went to look and saw something like this:

    September_18th_2011_the_description_was_more_than_a_dozen_words_and_the_link_disappeared_off_the_side_of_the_page_and_they_moaned_at_me_because_the_site_was_broken.jpg

    Their definition of “brief” was somewhat different to mine!

    And then there’s filenames like DSC_2043.JPG - but don’t get me started…

  • #3 / Apr 25, 2012 10:32am

    Shane Eckert

    7174 posts

    Hi Dr Crypto,

    Thanks for sharing! This is a good tip and something I most web devs just assume a user is going to know. 😊

    Thanks again and have a great week.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases