Pure PHP Upload 2 Support Product Page
This topic was archived
Saving Image Size
Asked 08 Nov 2003 18:12:23
1
has this question
08 Nov 2003 18:12:23 nathan thompson posted:
I am using the pure php to save image sizes. I have two questions?1.Can you save that size of more than one image on a single upload?
2. Most importantly is there a way to save the sizes but add a factor to them. I assume I would have to manually update the code but help me out here. For example if a factor of 10 was added I would like to have a 100 pixel wide picture be entered into the database as 110 pixel or if it was a 96 pixel wide picture I would like 106 to be entered.
Replies
Replied 11 Nov 2003 12:26:16
11 Nov 2003 12:26:16 Patrick Woldberg replied:
If you use hidden fields and the option in the Pure PHP Upload it will work with only one imagefield. However the code is allready a bit further and has several parameters of the files that can be requested if needed.
They can be called directly after the upload, parameters are:
$ppu->uploadedFiles['filefield']->field
$ppu->uploadedFiles['filefield']->fileName
$ppu->uploadedFiles['filefield']->fileSize
$ppu->uploadedFiles['filefield']->filePath
$ppu->uploadedFiles['filefield']->thumbFileName
$ppu->uploadedFiles['filefield']->thumbName
$ppu->uploadedFiles['filefield']->thumbExtension
$ppu->uploadedFiles['filefield']->thumbSize
$ppu->uploadedFiles['filefield']->thumbPath
$ppu->uploadedFiles['filefield']->thumbNaming
$ppu->uploadedFiles['filefield']->thumbSuffix
$ppu->uploadedFiles['filefield']->name
$ppu->uploadedFiles['filefield']->extension
$ppu->uploadedFiles['filefield']->imageWidth
$ppu->uploadedFiles['filefield']->imageHeight
$ppu->uploadedFiles['filefield']->thumbWidth
$ppu->uploadedFiles['filefield']->thumbHeight
'filefield' is the name of the filefield you want the info from, imageWidth and imageHeight contains the image sizes.
--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
They can be called directly after the upload, parameters are:
$ppu->uploadedFiles['filefield']->field
$ppu->uploadedFiles['filefield']->fileName
$ppu->uploadedFiles['filefield']->fileSize
$ppu->uploadedFiles['filefield']->filePath
$ppu->uploadedFiles['filefield']->thumbFileName
$ppu->uploadedFiles['filefield']->thumbName
$ppu->uploadedFiles['filefield']->thumbExtension
$ppu->uploadedFiles['filefield']->thumbSize
$ppu->uploadedFiles['filefield']->thumbPath
$ppu->uploadedFiles['filefield']->thumbNaming
$ppu->uploadedFiles['filefield']->thumbSuffix
$ppu->uploadedFiles['filefield']->name
$ppu->uploadedFiles['filefield']->extension
$ppu->uploadedFiles['filefield']->imageWidth
$ppu->uploadedFiles['filefield']->imageHeight
$ppu->uploadedFiles['filefield']->thumbWidth
$ppu->uploadedFiles['filefield']->thumbHeight
'filefield' is the name of the filefield you want the info from, imageWidth and imageHeight contains the image sizes.
--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
