Forums
This topic is locked
Using Pure ASP upload with ASPimage2
Posted 13 Aug 2002 03:54:09
1
has voted
13 Aug 2002 03:54:09 starr shaw posted:
Dose anyone know how to I can integrate pure ASP upload with the ASPimage component so an uploaded image will have a thumbnail created and both be upload and entered into database fields? Help Help Replies
Replied 15 Aug 2002 16:22:51
15 Aug 2002 16:22:51 Vince Baker replied:
You can specify in pure ASP upload to just save the file name in a database field.
Then on the page, create a recordset and goto add a hyperlink on the selected text/button. Instead of searching for a page select DATA SOURCE at the top of the window and then select your field with the filename in it.
You will see the code appended into the URL box. Before this add the path to your folder (no / at the beginning but remember to add one at the end i.e. uploaded_files/images/
This will make the image dynamic.<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Dose anyone know how to I can integrate pure ASP upload with the ASPimage component so an uploaded image will have a thumbnail created and both be upload and entered into database fields? Help Help
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Then on the page, create a recordset and goto add a hyperlink on the selected text/button. Instead of searching for a page select DATA SOURCE at the top of the window and then select your field with the filename in it.
You will see the code appended into the URL box. Before this add the path to your folder (no / at the beginning but remember to add one at the end i.e. uploaded_files/images/
This will make the image dynamic.<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Dose anyone know how to I can integrate pure ASP upload with the ASPimage component so an uploaded image will have a thumbnail created and both be upload and entered into database fields? Help Help
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 15 Aug 2002 17:13:19
15 Aug 2002 17:13:19 starr shaw replied:
Just in case anyone wanted to know, here is the code I used to integrate the two. After allot of thinking I shoveled my problem with this code insert into the incPureUpload:
'Creating Image Thumbnail And Optimizing Uploaded Image with APSimage2.0
Set Image = Server.CreateObject("AspImage.Image"
Image.AutoSize = false
Image.LoadImage "D:\WWWRoot\yoursite\www\images\" & UploadRequest.Item(GP_curKey).Item("FileName"
Ad_Max_Image_Width = "85"
HeightDivide = Image.MaxX / Ad_Max_Image_Width
NewHeight = (Image.MaxY / HeightDivide)
Image.Resize Ad_Max_Image_Width, NewHeight
Image.JPEGQuality = 80
Image.FileName = "D:\WWWRoot\yoursite\www\images\thumb_" & UploadRequest.Item(GP_curKey).Item("FileName"
Image.SaveImage
Set Image = nothing
'Creating Image Thumbnail And Optimizing Uploaded Image with APSimage2.0
Later!
'Creating Image Thumbnail And Optimizing Uploaded Image with APSimage2.0
Set Image = Server.CreateObject("AspImage.Image"
Image.AutoSize = false
Image.LoadImage "D:\WWWRoot\yoursite\www\images\" & UploadRequest.Item(GP_curKey).Item("FileName"
Ad_Max_Image_Width = "85"
HeightDivide = Image.MaxX / Ad_Max_Image_Width
NewHeight = (Image.MaxY / HeightDivide)
Image.Resize Ad_Max_Image_Width, NewHeight
Image.JPEGQuality = 80
Image.FileName = "D:\WWWRoot\yoursite\www\images\thumb_" & UploadRequest.Item(GP_curKey).Item("FileName"
Image.SaveImage
Set Image = nothing
'Creating Image Thumbnail And Optimizing Uploaded Image with APSimage2.0
Later!