cURL / Mailing Lists / curl-users / Single Mail

curl-users

Upload file through PHP app

From: jj <jj_at_macscripter.net>
Date: Mon, 02 Aug 2004 00:11:31 +0200

Hi all! (new at this list)

I'm trying to fill and submit a form through curl. I've had success with
some complex forms, but I'm not able now to use this one... I'm not sure but
perhaps the key is the file I must upload in a input-type-file (?)

It is a "multipart/form-data" POST form. This is the url (third <form> tag):

http://scriptbuilders.net/upload.php

And this is the shell script I use without success (if you use it for tests,
please keep the data as-is, that is, keep the word "TEST" at any place). I
use here break-lines only for better understanding of the script, but
arguments are space-separated.

###############################################################
curl -A 'Mozilla/4.0' -e 'http://scriptbuilders.net/upload.php'
-F author_name=TEST
-F author_email=TEST
-F author_url=TEST
-F display_email=false
-F script_name=TEST
-F version=1
-F osax=None
-F requirements=None
-F license=Freeware
-F script_type=Editable
-F selected_os[]=1
-F board=45
-F is_update=false
-F MAX_FILE_SIZE=100000000
-F short_desc=TEST
-F description=TEST
-F submit=foo
-F file=@/Users/jj/Desktop/test.sit
'http://scriptbuilders.net/upload.php'
###############################################################

Any help is appreciated... Cheers!

jj

-- 
http://www.macscripter.net/
http://www.osaxen.com/
Received on 2004-08-02