473,657 Members | 2,376 Online
Bytes | Software Development & Data Engineering Community
+ 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 1552
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
1834
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 the associated icon for those filetypes. Thanks for any help,
125
14703
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 software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
1
7816
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 followed by its traceback. def do_ask_fn_1(): z = askopenfilename(title=TITLE, initialdir=Dst_Dir, filetypes=(('AIFF Files','*.aiff'), ("AU Files", "*.au"),
1
1821
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 all file types to open with "save as" when href clicked
2
4322
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 there? What about Drag/Drop; is there more than one way for the source to make data available Is it always OLE?
2
3207
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 copies their document to a staging directory (because they're renamed to a unique filename for storage), then Respons.redirect()'ed to the staged file for download. This works great for most files(.doc,.xls,.psd,.pdf). However, I have discovered...
2
2311
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 can not upload a fake file. For this i require full path of file which unfortunately is not provided by $_FILES. I also can't use javascript as security issues arise and javascript does not provide support for file reading
6
3080
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), but import did not complain about it. Source table: Column Type Type
1
1316
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 back in place if you either 1.click on the main link again (STAFF in example 1)or 2. if you click on a different main link(STAFF, CAREERS or INTERNSHIP) (i think you know what i am talking about – just a boring moving menu) example 1
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8606
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7337
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6169
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4159
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2732
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 we have to send another system
2
1959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.