This topic is locked
[SOLVED]

 How can I assign the Thumbnail to a folder named by a co

8/5/2010 5:31:59 PM
ASPRunnerPro General questions
W
webwork author

ver 6.2, Win server 2003, ASPJPEG installed and working.
I was able to create Thumbnails, and upload images into a subdirectory named by a Column while naming the image using a Column name. Now I want the Thumbnail to find the same subdirectory as the image.
The code I am using for renaming the image is as follows: values("IMAGE_PATH") = values("IMGDIR") & "/" & values("IMGNAME") & ".jpg"
This works on the "before record updated page"
I have the default UPLOAD image subdirectory named "images" in the page settings dialog.
Currently the Thumbnails are created but land in the UPLOAD image subdirectory called "images".
I need them to go into the IMGDIR shown above where the regular images are now going.
Any suggestions?

A
ann 8/6/2010

Hi,
to rename uploaded files stored on a hard disc use this code as a sample:

'rename thumbnail

files_save(0)("filename") = values("IMGDIR") & "/th" & request.cookies("username") & Values("IMGNAME") & ".jpg"
'rename actual image

values("FieldName")= request.cookies("username") & Values("IMGNAME") & ".jpg"
W
webwork author 8/6/2010

Thank you Ann, I was able to get it to work, but I had to precede the IMGDIR value with the same value as the UPLOAD directory specified in the image properties dialog.



Hi,
to rename uploaded files stored on a hard disc use this code as a sample:

'rename thumbnail

files_save(0)("filename") = values("IMGDIR") & "/th" & request.cookies("username") & Values("IMGNAME") & ".jpg"
'rename actual image

values("FieldName")= request.cookies("username") & Values("IMGNAME") & ".jpg"