• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

Enctype variable in Apache?

Hello and welcome to this question.

I'm trying to make an upload file page that will run on an apache server.  Simply put, the script I am using is in a very little known language (J, www.jsoftware.com), which is not naturally a web language.  I can essentially make it do anything I'd want to do with another fine, more popular language (say PHP), so this is not the problem.

What I need to know is the name of the variable which contains the enctype or "Content-Disposition" in the Apache console.  I'm guessing it would be right along POST_STRING, QUERY_STRING, and the like.  So far, since I never tried uploading files, the POST_STRING was simply thus:

THEFILE=C%3A%5CDocuments+and+Settings%5Cmp%5CDesktop%5Ctest.txt&secret=xxxx

But with enctype="multipart/form-data" in the form, POST_STRING IS:


-----------------------------7d59d2d2b02c8
Content-Disposition: form-data; name="THEFILE"; filename="C:\Documents and Settings\mp\Desktop\test.txt"
Content-Type: text/plain

This is the content.
-----------------------------7d59d2d2b02c8
Content-Disposition: form-data; name="secret"

xxxx
-----------------------------7d59d2d2b02c8--

I need to figure out if there is an enctype so that I can somehow parse through this.

The webserver is Apache 2.0.47 (an update is out of the question, unfortunately), running on Windows 2000.

Thanks.
0
Gorizo
Asked:
Gorizo
1 Solution
 
ahoffmannCommented:
AFAIK there is no environment variable for that in apache, you need to use your languages API to query the header fields
0
 
GorizoAuthor Commented:
Well, parsing all that wasn't pretty, but it works.  I guess I asked for the impossible and you pointed me in the correct way.  You'll get your points.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now