Jump to content


Photo
* * * * * 2 votes

Generate a unique filename for new photos/avatars


  • Please log in to reply
4 replies to this topic

#1 Feld0

Feld0

    Advanced Member

  • +Clients
  • 307 posts

Posted 06 April 2012 - 03:26 PM

Would it be possible to change how photo filenames are generated when a user uploads a new photo? This will allow those of us using a CDN to see photos update instantly when a user updates theirs.

I love that IP.Board makes it so easy to rewrite static URL's for use with a CDN, but many members are continuously pestering my staff and filling our "site problems" section with "Why do I not see my new photo?" questions as the CDN can take several days to re-cache a file (and the change may take even longer to flow down to users thanks to their browser caching it as well), when the fix to this would be as simple as ensuring that a new upload gets a new filename. Browsers and the CDN will then notice that it's a file they've never seen before and will be forced to download a fresh copy of it.

The current naming scheme uses "photo-<user ID>". As the filename is stored in the database as part of an account's data, changing the naming scheme for photos to, say... include a timestamp, could be done safely without breaking any existing photos. I can't imagine it would be too difficult to stick a timestamp or some random number into the photo's filename in the place where it is generated, but it's a change that my members and I would greatly appreciate. Every other forum package I've seen (including the free ones) has some way of ensuring that new avatars or photos get a new filename.
  • Ryan H., Lockjit, insectdude and 3 others like this

~ The Feldian Network ~

MLP Forums - the friendliest forum on the ponynet

TheWiiU.com - the original Wii U forum community


#2 Ryan H.

Ryan H.

    Watch how I soar.

  • +Clients
  • 2,831 posts

Posted 06 April 2012 - 04:15 PM

This happens even without a CDN. A bit of a hassle to explain to users constantly.
  • Spyro7 likes this
Ryan Hoerr / "No1 1000" - Sublime Development

IP.Board 3.4 Resources bullet_star.pngbullet_star.pngbullet_star.pngbullet_star.pngbullet_star.png

Mod Advanced Tags & Prefixes

Mod Easy Pages

Skin Graphite

Skin Thoreau

#3 Kyronea

Kyronea

    IPB Newbie

  • Visitors
  • Pip
  • 1 posts

Posted 17 April 2012 - 02:14 AM

I would also like to see this implemented to speed up the avatar change time.

#4 Spyro7

Spyro7

    IPB Newbie

  • Visitors
  • Pip
  • 1 posts

Posted 17 April 2012 - 05:05 AM

Adding a unix timestamp to a filename would be as simple as using time(), and this one, simple change would make IP.Board users everywhere much happier.

One small tweak. Users would be happier. IPS customers would be happier. IPS would probably get more sales due to all of the sudden good feelings. It seems like it would be a win-win situation for everyone involved. Why not do it soon?

#5 Matt

Matt

    Chief Software Architect

  • IPS Management
  • 25,999 posts

Posted 17 April 2012 - 06:12 AM

Photos already have the timestamp added via a query string which should be fine for CDNs.
  • Feld0 likes this

Matt Mecham
Invision Power Services, Inc.
"I love deadlines. I especially like the whooshing sound they make as they go flying by."
-- Douglas Adams (1952 - 2001)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users