Gossamer Forum
Home : Products : DBMan SQL : Discussion :

file upload

Quote Reply
file upload
Is there any way of using the file upload mod with DB SQL 1.02? It seems there have been a few threads discussing it, but noone in particular seems to have a solution. Any help would be greatly appreciated....
Quote Reply
Re: [Explosivo] file upload In reply to
I did a custom job recently and implemented a file upload option into DBMAN SQL.

Sadly, I'm not sure I can show the code as it was a paid job :(

However here's a tip......

You will need to use CGI.pm and alter the parse sub in db.cgi for it to work.


Quote Reply
Re: [RedRum] file upload In reply to
I figured that the sub parse area was the biggest problem since the code is so different. Understand the paid part, but I would greatly appreciate the assistance. I guess I could pay for the working files as well.
Quote Reply
Re: [Explosivo] file upload In reply to
Ok, well there is another way to get around the problem but it is definitely not a great way, however it should work.

1) Add enctype='multipart/form-data' into your add/add error forms

2) In sub parse before any other code add:

use CGI qw(:standard);

my $in = new CGI;

...and then insert the code to do the uploading in an if block so it is ignored if there is no file to upload (using $in->param('file_field') to grab the file).

Then under that add:

$in = undef;

Then that should leave you with the rest of the parse sub below which will run as normal....

Last edited by:

RedRum: Oct 3, 2001, 1:08 PM
Quote Reply
Re: [RedRum] file upload In reply to
OK. I am able to get the file upload to work fine. I have 2 smaller issues that I am trying to resolve. First, I can't get the delete function to work. When I delete a listing, the associated image is NOT deleted. Second, When I modify a record, I get a strange confirmation, with a table that includes every image from every record. You past and future help is greatly appreciated.
Quote Reply
Re: [Explosivo] file upload In reply to
SmileFile Upload works fine now in the 2.0.1 distribution.Smile