I received an email back from the UPLOAD-POINT in regards to selecting only certain file extensions to be uploaded and this was his reply. I have not used it yet, but wanted to pass it on to those who wanted to used it.
Hello Ladybugmom,
Sorry so long to reply, I've been out of town.
The latest version (1.62 Beta) does not have an easy fix. This is because of the addition of the ability to upload multiple files at once. The version before (1.61 Beta) is essentially the same, has an easy fix, but doesn't allow multiple files to be uploaded at once.
I've had many requests for this, but I've not had any free time for a while to try to work on it. A user has sent his fix for 1.62 Beta if you want it, but it's pretty long and may have a few minor problems.
I'm sorry I couldn't have been of more help, but I truly have not had any time to work on it lately.
Regards,
Todd
The easy ;) fix to 1.61 Beta is this:
Code:
In index.php after line 306 is: // Path from domain name to upload
directory and line 315 is: // Redirect to upload page.
Replace the current code between these lines with this:
$file_ext = basename($_FILES['ftp_file']['name']);
$ext = substr($file_ext, strrpos($file_ext, '.') + 1);
$upload_dir = ($_SERVER['DOCUMENT_ROOT'] . "/$fileupload_dir_name/");
$target_path = $upload_dir . basename( $_FILES['ftp_file']['name']);
if (($ext == "ai") || ($ext == "eps") || ($ext == "psd") || ($ext ==
"pdf") || ($ext == "png") || ($ext == "gif") || ($ext == "tif") || ($ext
== "rar") || ($ext == "7z") || ($ext == "zip")) {
if (move_uploaded_file($_FILES['ftp_file']['tmp_name'], $target_path)) {
chmod($upload_dir . basename( $_FILES['ftp_file']['name']), 0644);
echo $p."$l_upload13 ". basename( $_FILES['ftp_file']['name']). "$p2";
} else {
echo $p."$l_upload14 ". basename( $_FILES['ftp_file']['name']). "$p2";
}
} else {
echo $p."$l_upload14 ". basename( $_FILES['ftp_file']['name']). "$p2";
}
The new line 311:
if (($ext == "ai") || ($ext == "eps") || ($ext == "psd") || ($ext ==
"pdf") || ($ext == "png") || ($ext == "gif") || ($ext == "tif") || ($ext
== "rar") || ($ext == "7z") || ($ext == "zip")) {
is where you can add or remove file types. If you just want .jpg files
then it should be:
if (($ext == "jpg")) {
Bookmarks