Gossamer Forum
Home : Products : DBMan : Customization :

Admin upload image?

Quote Reply
Admin upload image?
Help,I need a script to allow the admin to upload or insert pictures in each record. Can upload via ftp..does not have to upload through DBman.

Also, how do I print the image that is uploaded.

I really appreciate the help!
Tommy

Quote Reply
Re: Admin upload image? In reply to
Go see the 'Resources' section for DBMan - look for the 'File Upload Mod' for uploading single files or the 'Multiple File Upload Mod' for many files.


Keef

Quote Reply
Re: Admin upload image? In reply to
Thanks Keef. I was looking for something simpler. I have tried to load the mod and was unsuccessful. Guess I can keep trying.

How do you tell where the picture should print?

Thanks,
Tommy

Quote Reply
Re: Admin upload image? In reply to
tgardner:

You can easily just create a field for your image or one for each image that you will be uploading to the server.

Let's say you call the field "image".
When you add a record to your database in the field for your image you would enter either the full or relative path to your image. (You should store your images outside of your cgi-bin directory).

Then to display the image within your record you would simply use:

<img src="url/to/graphics/$rec{'image'}">

or

<img src="$rec{'image'}">

If your images will all be the same size you can also include the height, width, and Alt tags which will help your images load faster and provide text for non-graphical browsers.

For more information about working with Images please visit the FAQ noted below and look under "Working with Images".

Hope this helps

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/