PDA

View Full Version : form action gives wrong name results for down load of file.


Tex
05-21-2008, 06:02 PM
Hi,

I use a program written in perl to display my family history on my web pages. One feature is to allow people who visit to d/l my data in what is called the GEDCOM format with a file .ext of .ged to their own computer as a working file.

I know nothing about perl or writing code. My hobby is Genealogy and I am trying to use this software to display that info. I am having trouble with this one feature and need help in getting that fixed.

When a person clicks on a button , see here:

{ http://www.dixhistory.com/cgi-bin/igmged.cgi?Database=dick&Subject=I2516&Name=William%20Earl%20Ballard%20 }

it should d/l a file with the .ext of .ged but it's not doing that. This is what it gives and down loads:

dick.com&type=ancestors&Max=5&Eol=CRLF

I want it to just say dick.ged

The above file once d/l and renamed with the .ged .ext does call my genealogy software and does work. Many people know how to d/l and import the GEDCOM = .ged ext but would not know to rename it.

So I need to find which .cig script is giving this and hope you guys can tell me how to fix it. I have attached the one that I think it is but am not sure.

I also am new to formus so if the attached .cig script that I changed to .txt .ext doesn't work, or if I need do it some other way please let me know.

You help is most appreciated, Thanks Tex-

KevinADC
05-21-2008, 06:33 PM
hard to say but try this, find this line in the file you attached to your post:

print "Content-Type: application/binary\n\n";

and change it to:

# print "Content-Type: application/binary\n\n";
print "Content-Type: application/x-download\r\n";
print "Content-Disposition: attachment;filename=\"dick.ged\"\r\n\r\n";


Rerun your script and see if it helps. Make sure to put the "#" as shown above.

Tex
05-21-2008, 06:59 PM
KevinKDC,

Worked like a charm !

Thank you.

Tex-