Closed (fixed)
Project:
Avatar Crop
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jun 2009 at 15:50 UTC
Updated:
15 May 2010 at 17:56 UTC
The browser displays original image instead of the cropped image until Refresh or Reload is clicked in the browser. This is because the same file name is used for both the original and cropped image. This is easily fixed by renaming the file after cropping in function cropUserPic_submit().
Comments
Comment #1
wzigg commentedComment #2
wzigg commentedAdd this to cropUserPic_submit():
Comment #3
gitin commentedsorry not working for me, i still have to refresh crop page to c the actual uploaded image, otherwise it shows the old image which is already there or which is current pic of the user...
is anybody having the same problem..???
Comment #4
mmachina commentedI am getting the same problem... I checked the module code and it appears that the code suggested above has already been inserted into the module by the maintainer...
*****************************
$dot = strrpos($src, '.');
if (!($dot === false))
{
$newsrc = substr($src, 0, $dot) . rand() . substr($src, $dot);
if (rename($src, $newsrc))
{
$src = $newsrc;
}
}
*****************************
However, the problem still persists...
Comment #5
adeel.iqbal commented@mmachina: can i see the problem? please show me your site? or send me your code so i can analyze the problem.
Comment #6
adeel.iqbal commentedResolved in later versions. Not reported again.