Piwigo Bugtracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000126Piwigouploadpublic2005.07.10 15:412008.07.03 22:04
ReporterChD 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.4.1 
Target VersionFixed in Version1.7.1 
Summary0000126: unable to upload thumbnail if thumbnail directory don't exist
DescriptionFor a new category just added, there is no thumbnail directory. When uploading the first picture, if i choose to upload the thumbnail too, it fails.
Additional InformationHere is a possible correction to apply in upload.php :

@@ -234,6 +235,12 @@
   $file = substr ( $row['file'], 0, strrpos ( $row['file'], ".") );
   $extension = get_extension( $_FILES['picture']['name'] );
   $path = $page['cat_dir'].'thumbnail/';
+ // Verify the existence of $path (thumbnail directory)
+ if (!is_dir($path))
+ {
+ umask(0000);
+ mkdir($path, 0777);
+ }
   $path.= $conf['prefix_thumbnail'].$file.'.'.$extension;
   $result = validate_upload( $path, $conf['upload_maxfilesize'],
                              $conf['upload_maxwidth_thumbnail'],
TagsNo tags attached.
browserany
Database engine and version
PHP version4.3.10-15
Web serverApache 2.0.54
Attached Files

- Relationships

-  Notes
(0002255)
mathiasm (manager)
2008.07.03 22:04

Fixed at least in 1.7.1 and Trunk as of 2008.07.03 in [Subversion] r2418

- Issue History
Date Modified Username Field Change
2005.07.10 15:41 ChD New Issue
2005.07.10 15:41 ChD browser => any
2005.07.10 15:41 ChD PHP version => 4.3.10-15
2005.07.10 15:41 ChD Web server => Apache 2.0.54
2008.07.03 22:04 mathiasm Status new => closed
2008.07.03 22:04 mathiasm Note Added: 0002255
2008.07.03 22:04 mathiasm Resolution open => fixed
2008.07.03 22:04 mathiasm Fixed in Version => 1.7.1


Copyright © 2000 - 2015 MantisBT Team
Contact
Powered by Mantis Bugtracker