cURL / Mailing Lists / curl-users / Single Mail


problem uploading files using web form

From: David Sinclair <>
Date: Sat, 17 Nov 2001 11:26:46 -0700


I am using free webspace at which does not allow FTP uploading. The upload form looks essentially like this:

<form method="post" action="" enctype="multipart/form-data">
<input type="hidden" name="user-name" value="{user-name}">
<input type="hidden" name="pass-key" value="{session-id}">
<input type="hidden" name="work-dir" value="images/">
<input type="hidden" name="page" value="0">
<input type="hidden" name="form-type" value="fm">
<input type="hidden" name="num-files" value="2">
<input type="file" name="upload0" size="40">
<input type="file" name="upload1" size="40">
<input type="submit" name="prev" value="Previous Page">
<input type="submit" name="next" value="Next Page">
<input type="submit" value="Submit">
<input type="reset">

so I use

curl -# -v -F "upload0=@image.jpg" -F "user-name={user-name}" -F "pass-key={session-id}" -F "work-dir=images/" -F "page=0" -F "form-type=fm" -F "num-files=2" -F "submit=submit"

which works fine *if* image.jpg is less than about 8K in size. More than that, and the server returns a server error 500. There is no such limit
when uploading with IE 5 or Mozilla.

I am using curl 7.9.1 (win32-nossl) on the Win ME command line.

Ideas anyone?

Received on 2001-11-17