I did some digging and found part of the mod Phoenix did and the one cjhveill put together latter on...
I have gotten this mod to work as is, but probably wont be able to provide you with much support...
the add.cgi and the 3 add.html files are attached...
hope this helps!
chuck
====================================
Here is the much anticipated Upload Mod previously posted by Phoenix.
I have gathered the info from a number of sources including several
posts and help from YellowKard from www.fullwormage.com.
I have it running on Unix but have had little luck with Win so far.
The current mod will allow users to upload a file or specify a URL
but not both.
1. Replace the add.cgi file. With the new one. Located at www.journeyit.com/download/add.cgi
You will want to modify the automated email sent to the administrator.
2. Then edit links.def file and make sure the URL field is set to be not mandatory with a 0
for the 5th attribute.
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 0, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [6, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes']
3. Then in links.cfg add:
Under Path setup add (Make sure you create the Dir /Attach or it will not work):
# PATH and URL of Attach Folder
$build_attach_path = "$build_root_path/Attach";
$build_attach_url = "$build_root_url/Attach";
Between database options and email options add:
# Uploaded File Settings
# --------------------------------------------------------
# Name of the field in your links.db where the URL of the uploaded
# file will be stored
$attach_file_field = "URL";
# Do you want this to be a required field? 1=Yes 0=No
$attach_field_required = 0;
# Maximum size for file attachments (in KB)
$attach_file_size = "2000";
# List of allowable file extensions. If the file does not have one of the extensions
# listed, it will not be saved to the server. The format for the setting is
# \.extension$
# If you want to allow more than one extension, separate the options by
# a | character. On a UNIX server, these are case sensitive.
$attach_ext = '\.*$';
4. In the add.html file:
Change the form action to the following:
<form action="<%db_cgi_url%>/add.cgi" enctype='multipart/form-data' method="POST">
Add a field where you want the entry for upload:
<input type="file" name="attach">
Should work with those modifications.
Christian
=====================================