473,468 Members | 1,332 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

About filetypes in link

129 New Member
Hello friends,
I have one smalll doubt that when we write a link with anchor tag we are giving the url as href to where it should redirect, my question is when we click that link the link willl automatically redirect to the url we had given, but my intension is when we click that link the file should be downloaded like
in some sites when we click a link the browser is asks for save the file (or) open that with that for any software. Like that i want the coding when we click the link the browser has to ask save this file or open this file.

My configuration is,
I am using modperl , Apache server, Linux operating system and the file type is CSV.
Mar 23 '09 #1
6 1542
Dormilich
8,658 Recognized Expert Moderator Expert
if the browser doesn't have the appropriate plugin or supports the file type natively, the download prompt will be the default action. otherwise you have to set the "content-disposition" header to "attachment".
Mar 23 '09 #2
sasimca007
129 New Member
Hai friend i searched in the internet, i found what u saying but nobody telling how to? can u please send me sample code please
Mar 23 '09 #3
Dormilich
8,658 Recognized Expert Moderator Expert
e.g. this one (though slightly different)
Mar 24 '09 #4
sasimca007
129 New Member
Hi friend,
I tried that but it is telling that Invalid command 'Header', when i restarted the apache. May be a module should be install for that Header and one more thing i should tell you that is the filetype is not cvs it is csv. Sorry for confusing and wrong information.
Mar 24 '09 #5
Dormilich
8,658 Recognized Expert Moderator Expert
which modules (besides mod_perl) are installed on the server?
Mar 24 '09 #6
sasimca007
129 New Member
Hi friend, thanks for the help i got it by using Apache::File module
Mar 24 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jakob Bengtsson | last post by:
Hi, Does anyone know how to get the icons for all filetypes installed on the system? I can extract the associated icon from a file, but I don't know how to: 1) Get a list of filetypes; 2) Get...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
1
by: Justin Straube | last post by:
Hopefully someone can catch what im missing here. Ive googled this and I think Ive got the filetypes arg written properly, but I get a traceback when calling this function. Heres the code...
1
by: Daniel | last post by:
streaming random filetypes from .aspx how to stream a file from inside a .aspx? e.g. so one could go href="./foo.aspx?file=bar.mp3" or href="./foo.aspx?foo.dat" etc. preferabley i would like...
2
by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard ( I don't mean different formats): SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put...
2
by: Brandon | last post by:
Running IIS 6, Classic ASP Browser: IE and/or Mozilla I have an application that allows users to store documents on my server. When they need to access/download the documents, my application...
2
by: ali | last post by:
i am trying to upload file to server and at server side i am using $_FILES to receive file and uploading. i want to make sure that file which has been selected by user actually exists and user...
6
by: Hemant Shah | last post by:
Folks, Today, I was exporting a table in one database and then importing it in another database. The table in destination database was missing one column (my mistake while creating the table),...
1
by: leahleah | last post by:
hi, i am a beginner when it comes to javascript, i would like to have a menu (see examples 1 and 2 below), that folds out to reveal sub links, pushing the other menu items down – and then springs...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.