 | |  | | | Photopost Pro Bug Reports Post post installation PhotoPost Pro problems here. |
January 30th, 2007, 10:02 PM
|
#1 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2007
Posts: 20
| thumbnail litter
I've found that if someone tries to upload an image that is smaller than the minimum set in admin panel then the thumbnail is created but the larger image is not and the user is given an error. Ok so far but the thumbnail is left as a zombie out in the thumbs directory and doesn't show up in the users gallery. I wouldn't expect the image to show up but the upload should clean up after itself if it gets an error.
Is there any automated way to clean up these zombie files?
|
| |
January 31st, 2007, 10:44 AM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,692
|
If a file is tried to upload under the minimum settings it should give error saying it is too small
You have some examples here
|
| |
January 31st, 2007, 10:58 AM
|
#3 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2007
Posts: 20
| Quote:
Originally Posted by Chuck S If a file is tried to upload under the minimum settings it should give error saying it is too small
You have some examples here | As I stated the user does get an error saying the file is too small but the thumbnail for that image is created in the data directory anyway. The larger file is not loaded into the data directory so then you end up with a bunch of thumbnail images that don't correspond to a larger image anywhere. You only see these thumbnails if you go into the directory and have a look. They aren't visible to the user or admin through the product interface.
|
| |
January 31st, 2007, 11:12 AM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,692
|
So you have no example to provide okay well I will need to do testing
|
| |
January 31st, 2007, 12:18 PM
|
#5 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2007
Posts: 20
|
It's pretty easy to verify just try and upload a file that's too small then go look for the filename.
|
| |
January 31st, 2007, 12:54 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,692
|
HMM how about in image-inc.php make this change in bold and test Code: Content visible to verified customers only.
|
| |
January 31st, 2007, 02:45 PM
|
#7 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2007
Posts: 20
| test
Will do - it will be this evening before I get to it though.
|
| |
January 31st, 2007, 08:38 PM
|
#8 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2007
Posts: 20
|
Chuck I think something like this needs to happen. When the diewell is hit that doesn't write a record to the db then the product code doesn't display the image. When it dies then there is a file left in the upload directory, a file left in the thumb directory, and a file left in $filepath.
This code cleans up the problem in the case I tested - the only thing I'm not sure about is how the paths might be affected by trying to upload images into albums or other cat dirs. Can you shed any light on that?
// Too small?
if ( ($Globals['minwidth'] > 0 && $imagewidth < $Globals['minwidth']) || ($Globals['minheight'] > 0 && $imageheight < $Globals['minheight']) )
{
// @unlink($realname); commented out by GCS
// remove the large file
@unlink($filepath);
// remove the thumbnail
$thumbpath = "{$Globals['datafull']}$thecat/thumbs/$realname";
@unlink($thumbpath);
// remove the file from the uploads directory
$upimgname = "{$Globals['PP_PATH']}/uploads/$upuserid/$realname";
@unlink($upimgname);
diewell( "Your graphic $realname is too small!<br /><br />Images must be at least {$Globals['minwidth']}x{$Globals['minheight']}" );
}
|
| |
January 31st, 2007, 08:52 PM
|
#9 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,692
|
The edit I noted is correct
|
| |
January 31st, 2007, 08:54 PM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,692
|
what version of software you using? The lines I noted above is the edit needed
|
| |
January 31st, 2007, 08:56 PM
|
#11 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2007
Posts: 20
|
Well yes what you wrote will remove the file from one of the 3 places that it exists.
|
| |
January 31st, 2007, 09:12 PM
|
#12 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2007
Posts: 20
|
Version 5.62
|
| |
February 1st, 2007, 09:04 AM
|
#13 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,692
|
And what places do you think it does not get removed from?
|
| |
February 1st, 2007, 09:13 AM
|
#14 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2007
Posts: 20
| mods
After modifying the code to unlink($filepath) only, the image still remains in the ($thecat)/thumbs directory and it remains in the /uploads/(userid) directory.
|
| |
February 1st, 2007, 09:48 AM
|
#15 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,692
|
Your code should work
|
| |
February 1st, 2007, 09:56 AM
|
#16 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2007
Posts: 20
|
It has based some more testing I've done.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | |
Similar Threads | | Thread | Thread Starter | Forum | Replies | Last Post | | Thumbnail blurry | angkor408 | Photopost Pro Installation & Upgrades | 21 | December 15th, 2006 10:11 AM | | Specify User Thumbnail? | cathcane | Photopost Pro How Do I...? | 2 | April 29th, 2006 09:38 AM | | Thumbnail Resize | Supafly | Photopost Pro How Do I...? | 4 | April 18th, 2006 10:41 AM | | Thumbnail Links: | Brinnie | vBGallery Suggestions | 6 | August 11th, 2005 11:01 PM | | Thumbnail not available | susanreno | Photopost Pro Installation & Upgrades | 1 | December 13th, 2004 09:38 AM | All times are GMT -5. The time now is 12:10 PM. | |