HighDots Forums  

HTTP Header form fields and file upload

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss HTTP Header form fields and file upload in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris
 
Posts: n/a

Default HTTP Header form fields and file upload - 05-25-2004 , 04:15 PM






I'm trying to automate the process of uploading files from a client to
a webserver. I know that this can't be done by setting the value of
the file field in an html form.

So far, the plan is to mimic the upload form by sending an http
request to the server. I can do this without the file upload no
problem, but I can't figure out how to include the file as well. Can
anyone please help?

Chris

Reply With Quote
  #2  
Old   
Claire Tucker
 
Posts: n/a

Default Re: HTTP Header form fields and file upload - 05-25-2004 , 05:11 PM






On 25 May 2004 13:15:59 -0700, c.hogben (AT) ukonline (DOT) co.uk (Chris) wrote:

Quote:
I'm trying to automate the process of uploading files from a client to
a webserver. I know that this can't be done by setting the value of
the file field in an html form.

So far, the plan is to mimic the upload form by sending an http
request to the server. I can do this without the file upload no
problem, but I can't figure out how to include the file as well. Can
anyone please help?

Can you clarify this a bit?

Are you essentially trying to create an HTTP request from some
non-browser software which will mimick what happens when a file is
uploaded from a browser form?

In this case, this isn't really the newsgroup for you, since you are
asking an HTTP question rather than an HTML question. (Someone here
can probably answer in suitable detail, though).

If instead you are asking if there's a way to automatically make a
browser upload a specific file without user intervention, then no that
is not possible for security reasons. (I think you said as much in
your first paragraph.)

If you are only interested in uploads from your non-browser client
software, you might instead prefer to bypass the usual form encoding
completely and just send a POST or PUT request with data of the
relevant type either included raw or using some kind of encoding. Just
set the Content-type to the correct type of the uploading data and
read the raw data on the server.

-Claire


Reply With Quote
  #3  
Old   
Chris
 
Posts: n/a

Default Re: HTTP Header form fields and file upload - 05-26-2004 , 01:35 AM



Claire Tucker <fake (AT) invalid (DOT) com> wrote

Quote:
On 25 May 2004 13:15:59 -0700, c.hogben (AT) ukonline (DOT) co.uk (Chris) wrote:

I'm trying to automate the process of uploading files from a client to
a webserver. I know that this can't be done by setting the value of
the file field in an html form.

So far, the plan is to mimic the upload form by sending an http
request to the server. I can do this without the file upload no
problem, but I can't figure out how to include the file as well. Can
anyone please help?


Can you clarify this a bit?

Are you essentially trying to create an HTTP request from some
non-browser software which will mimick what happens when a file is
uploaded from a browser form?

In this case, this isn't really the newsgroup for you, since you are
asking an HTTP question rather than an HTML question. (Someone here
can probably answer in suitable detail, though).


[snip - sorry]
-Claire
Thanks Claire,

That's exactly what I'm after. I've tried IEWatch to 'sniff' the http
sent from a browser (mocked up the form in html) to the server inorder
to recreate it from a vb program, but it doesn't record enough detail.

Could you please point me to a suitable resource for creating the http
from scratch? I'm having very little luck I'm afraid.

Chris


Reply With Quote
  #4  
Old   
Nick Kew
 
Posts: n/a

Default Re: HTTP Header form fields and file upload - 05-26-2004 , 03:10 AM



In article <90ad5add.0405252135.759c9fb1 (AT) posting (DOT) google.com>,
c.hogben (AT) ukonline (DOT) co.uk (Chris) writes:

Quote:
Could you please point me to a suitable resource for creating the http
from scratch? I'm having very little luck I'm afraid.
The RFC is at ietf.org. Or can be found from the other usual suspects
such as w3.org. Either way, it's totally offtopic here.

If you want to do it the easy way, use a pre-packed implementation.
For example, it's a five-minute hack starting from Perl's LWP.

--
Nick Kew

Nick's manifesto: http://www.htmlhelp.com/~nick/


Reply With Quote
  #5  
Old   
Pierre Goiffon
 
Posts: n/a

Default Re: HTTP Header form fields and file upload - 05-26-2004 , 04:05 AM



"Chris" <c.hogben (AT) ukonline (DOT) co.uk> a écrit dans le message de
news:90ad5add.0405251215.11842cc5 (AT) posting (DOT) google.com
Quote:
I'm trying to automate the process of uploading files from a client to
a webserver. I know that this can't be done by setting the value of
the file field in an html form.

So far, the plan is to mimic the upload form by sending an http
request to the server. I can do this without the file upload no
problem, but I can't figure out how to include the file as well. Can
anyone please help?
You can read the HTTP RFC (2616), I think it contains all the informations
you need !



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.