Gossamer Forum
Home : Products : DBMan : Customization :

Upload Mod vs NT

Quote Reply
Upload Mod vs NT
run the upload mod in NT servers???,

Actually DBMAN scripts run very good in thi server.

Thanks
Quote Reply
Re: Upload Mod vs NT In reply to
I dunno. I don't have an NT server to test it on. You could give it a shot and see what happens. If it doesn't work, delete it.


------------------
JPD






Quote Reply
Re: Upload Mod vs NT In reply to
Yes...you can...

What you need to do is set the upload directory to the following permissions...

IWAM_MACHINENAME = Read, Write, Delete
IUSR_MACHINENAME = Read, Write, Delete
Everyone = Read, Write, Delete
Admin = Read, Write, Execute, Delete

If you are using the older file upload mod, you may have to change some of the settings in the CGI.pm module.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: Upload Mod vs NT In reply to
Strong suggestion -- Don't use the older file upload mod. Use the one at http://www.jpdeni.com/...ods/file_upload2.txt .

I'll be very happy when John gets a chance to update the Resource Center.


------------------
JPD






Quote Reply
Re: Upload Mod vs NT In reply to
Dear Friends
Thks! for your assistance. With yours mods all has been all right.
But, We have a new problem. The user input the full file path in "Graphic" field (c:\clipart\myfile.gif). This is saved in the database. But, We need only the file name (myfile.gif) and we wish to cut the path.
We are newbies perl programmers. Please help!

Thanks.
(sorry for our terrible english, we speak spanish)
Quote Reply
Re: Upload Mod vs NT In reply to
If you need to keep the name of the original file, but not the path name, after

Code:
if (($status eq "ok") && ($in{'Filename'})) { $status = &validate_upload; } #Validate Picture

in both sub add_record and sub modify_record, add

Code:
if ($in{'Filename'}) {
while (($pos =index($in{'Filename'},'\\', $pos)) > -1) {
++$pos;
$i = $pos;
}
$file_name_len = length($in{'Filename'}) - $i;
$in{'Filename'} = substr($in{'Filename'},-$file_name_len,$file_name_len);
}

Understand that if the user modifies the record but does not upload a file, the Filename will be deleted.

No problem about your English. It's fine. Smile

------------------
JPD


[This message has been edited by JPDeni (edited May 01, 2000).]