I tried to fully discribe my problem in the title. Anyway, i'm using the image module so that users can upload their own image.

Example of my problem:

If i upload file example1.jpg it's called picture-1.jpg [FINE]
When i upload example2.jpg it replaces to original and it's still called picture-1.jpg [FINE]
But when i upload: example3.gif drupal names it picture-1.gif, but it does not delete picture-1.jpg. [PROBLEM]

This is a problem because im using my own layout and code to show the userpicture in a custom profile.

IF!!this is not fixable, where can i select the extensions that are permitted to be uploaded as a userpicture?

Anyone?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drewish’s picture

Project: Image » Drupal core
Version: 5.x-1.x-dev » 6.x-dev
Component: image.module » user.module
Category: support » bug

are you having them create image nodes or are they setting uploading the image to their user profile fields? based on your initial description and the paths you provided i think this is really a bug with the core user.module.

i just checked and this is still a bug in 6.x. we probably just need to delete picture-nid.* when uploading a new picture.

drewish’s picture

Status: Active » Needs review
FileSize
1.26 KB

easier than i thought... the old $account is put on the form. we can just look at its picture.

drewish’s picture

FileSize
1.14 KB

whoops, that last patch only works when you upload a different file format.

Jody Lynn’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
979 bytes

Tested and rerolled for HEAD.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Well, this was committed in http://drupal.org/cvs?commit=92224 and released in RC1. I just forget to close this issue, and thank you for the fix.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.