473,386 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Setting Content-type when uploading file ??

109 100+
Hi.. i am doing a uploading CGI perl script...

I notice that when i send data using form submission with POST method, the Content-type changes with different type of file used. Is it possible to "fix" the content-type to one type?

thanks...
Jul 13 '07 #1
3 1848
acoder
16,027 Expert Mod 8TB
You can use the setRequestHeader method:
Expand|Select|Wrap|Line Numbers
  1. xmlhttp.setRequestHeader("Content-Type","text/xml")
Jul 14 '07 #2
skyy
109 100+
You can use the setRequestHeader method:
Expand|Select|Wrap|Line Numbers
  1. xmlhttp.setRequestHeader("Content-Type","text/xml")

Hi.. thanks..

But do i need to enable the ActiveXObject thing on the browser?

I am trying to upload files using CGI and set the content type to a specific type. Is it possible?
Jul 16 '07 #3
skyy
109 100+
Hi.. thanks..

But do i need to enable the ActiveXObject thing on the browser?

I am trying to upload files using CGI and set the content type to a specific type. Is it possible?
Any idea how to change the content-type for the post data?
Jul 17 '07 #4

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

Similar topics

11
by: Bozo Schmozo | last post by:
Greetings! I've searched groups.google.com already to see if I can determine if using PHP/MySQL (if needed) for a web site I wish to develop. As the subject indicated, it will be a content...
3
by: John A Grandy | last post by:
on my WebForm, Panel1 is positioned absolutely , with settings for Top , Left , Width , Height ... Panel1 contains various sub-panels: PanelA , PanelB , PanelC ... these sub-panels' content...
3
by: Sugapablo | last post by:
Is it possible to create a DIV that could be, for example, 300 x 200 pixels and make it so whatever content might appear in it, won't break it? Let me try to explain: Let's say I have a site...
4
by: Jonathan Wood | last post by:
I'm pretty new to ASP.NET. I have some panels with text in them. These panels also include hyperlinks. I created a stylesheet and the panel's CssStyle property is set to the corresponding style....
2
by: Paul Phillips | last post by:
Has anyone been able or is having trouble with setting the Content-Encoding to a value in the headers collection of an HTTPWebRequest object. I am trying to post a RosettaNet message to a trading...
3
by: Laith Zraikat | last post by:
I need to set the page title for a content page in a master page, and do that using local reources so that I can have my page title in different languages. I can do that easily using global...
1
by: Asif | last post by:
Hi All, I did follow the MSDN article (http://msdn2.microsoft.com/en-us/ library/ms379585(VS.80).aspx ) for overriding Master Page properties by setting page title and other Meta information(...
1
by: lister | last post by:
Hi, I have a div with fluid content, below which I want a scrollable div. I can't work out how to style the scrollable div to say "use the rest of the space in the container". The best I can...
2
by: hzgt9b | last post by:
Using VS2005, VB.NET and lots of javascript, I have a page with (gasp) frames on it. It has two frames a navigation pane and a "content" pane. The navigation pane runs a page that has lots of...
3
Frinavale
by: Frinavale | last post by:
So, the opacity style is rather annoying because every browser seems to handle it differently. I guess it's because opacity wasn't included in the w3c standards to begin with...mind you if it had...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.