cURL / Mailing Lists / curl-users / Single Mail

curl-users

upload text file and email address simultaneously using -T option?

From: Arvind Marathe <arvind_at_mbu.iisc.ernet.in>
Date: Sun, 11 Mar 2007 21:54:26 +0530 (IST)

Hi all,
am new to curl and i need to upload a large number of files along with my
e-mail address (for the output to be sent to) on the server:
http://predictdnahth.rutgers.edu/

If i try the following command just for file upload, it says 'not allowed'
.........................................................................

arvind_at_orion:/tmp$ curl -F
upfile=@1RR7.pdb -F press=Send http://predictdnahth.rutgers.edu/
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>405 Method Not Allowed</TITLE>
</HEAD><BODY>
<H1>Method Not Allowed</H1>
The requested method POST is not allowed for the URL /index.html.<P>
<HR>
<ADDRESS>Apache/1.3.29 Server at predictdnahth.rutgers.edu Port 80</ADDRESS>
</BODY></HTML>pdb -F press=Send http://predictdnahth.rutgers.edu/
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>405 Method Not Allowed</TITLE>
</HEAD><BODY>
<H1>Method Not Allowed</H1>
The requested method POST is not allowed for the URL /index.html.<P>
<HR>
<ADDRESS>Apache/1.3.29 Server at predictdnahth.rutgers.edu Port 80</ADDRESS>
</BODY></HTML>
.........................................................................

However if i try just file upload using the -T option (see below), it
seems to accept it, but then it does not find the email address.
.........................................................................
arvind_at_orion:/tmp$ curl -T 1RR7.pdb
http://predictdnahth.rutgers.edu/cgi-bin/upload2.cgi
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
        "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en-US"><head><title>Search Results</title>
</head><body bgcolor="white"><h2>Search Results</h2>Nothing uploaded?<p>
Cannot bind to map mail.aliases in domain nbchem: no such map in server's
domain: Invalid argument
No recipient addresses found in header
.........................................................................

Can somebody tell me how also to include the email address along with the
filename when using -T option? If i can do it with one file, i hope to
repeat the operation for some 300 more files using a 'for' loop.

Regards,
Arvind
Received on 2007-03-11