Please note that the folder 'admin/images' MUST have read/write
AND modify permissions set on it for the image library to work.
Do this from right click in windows explorer or ask your isp
to set up these permissions.
( having read and write permissions will allow you to upload
files but you will need modify permissions to delete them...)
the files default_image.asp and upload.inc are created if you
have 'Create image library' checked when you generated the files
After you have created your asp files then you will see a link
'Image library' on all screens ( apart from the list screens
) in your administration area.
clicking on that link will open this window
There is currently no pictures in the folder admin/images so
there is nothing in the list
browse for a picture on your local hard drive and then click
upload.
After the picture has uploaded click on select.
In this example we are adding pictures to our contact database.
You will see the 'path guide' which is the path of the image
from the root of the website.
This means it is an easy task to paste this into a 'picture
path' field that you can create in one of your tables.
For instance in the contact demo there is a field called contactPicture.
We can find the record for this person - paste the value of
'path guide' into this field and then update the record.
Now we just need to display this picture on the 'front end'
easy!
in our contact example open up the file contactsDetail.asp.
find this line
<tr><td valign=top>contactPicture</td><td><%=rs("contactPicture")%></td></tr>
Now replace this line with...
<tr><td valign=top>contact
Picture</td><td>
<%
'check to see if there is a picture !
if rs("contactPicture")<>"" then %>
<img src="<%=rs("contactPicture")%>">
<%else
response.write "currently no picture!"
end if %>
</td></tr>
thats it ! - you
can see a demo here ! this took 5 minutes to get online
- 5 minutes!!!! - for a fully administratable online database
with image upload and control!!!!! - create news scripts, product
lists , picture galleries - all in pure asp all with incredible
speed !!!